Vega FEM Library (v1.1) User's Manual - University of Southern ...
Vega FEM Library (v1.1) User's Manual - University of Southern ...
Vega FEM Library (v1.1) User's Manual - University of Southern ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
virtual ~IntegratorBase()<br />
Frees (free) the internal buffers.<br />
virtual void ResetToRest()<br />
Sets the internal position, velocity, and acceleration buffers to zero.<br />
virtual int SetState(double * q, double * qvel=NULL) = 0<br />
Resets internal position buffer to the values in q, and does likewise for internal velocity buffer if qvel is<br />
not NULL. Returns 0 if successful, 1 otherwise.<br />
void SetqState(const double * q, const double * qvel=NULL, const double * qaccel=NULL)<br />
void GetqState(double * q, double * qvel=NULL, double * qaccel=NULL)<br />
Copies external position, velocity, and/or acceleration buffers to the internal buffers, or vice versa. Each<br />
buffer is copied only if the pointer to the external buffer is not NULL.<br />
void SetExternalForces(double * externalForces)<br />
void AddExternalForces(double * externalForces)<br />
void GetExternalForces(double * externalForces)<br />
Sets or adds the values from externalForces to the external forces buffer, or writes the external forces<br />
buffer to externalForces.<br />
virtual void SetTimestep(double timestep)<br />
double GetTimestep()<br />
Sets or returns the timestep value.<br />
virtual int DoTimestep() = 0<br />
Implementations perform a timestep <strong>of</strong> the simulation, given the current values in the internal/external<br />
forces, position, velocity, and acceleration buffers. The resulting position, velocity, and acceleration are saved<br />
to these buffers. Returns 0 if and only if the timestep is completed without error.<br />
class IntegratorBaseSparse : public IntegratorBase A base class for integrators for dynamical systems<br />
characterized by (large) sparse matrices. All integrators in <strong>Vega</strong> are <strong>of</strong> this type. These integrators<br />
use a ForceModel class to obtain the internal forces and stiffness matrices. Stiffness matrices are sparse<br />
and stored using the SparseMatrix class. IntegratorBaseSparse stores two sparse matrices: the mass<br />
matrix and the damping matrix to be applied in addition to mass- and stiffness-based damping specified in<br />
IntegratorBase.<br />
IntegratorBaseSparse(int r, double timestep, SparseMatrix * massMatrix,<br />
ForceModel * forceModel, int numConstrainedDOFs=0, int * constrainedDOFs=NULL,<br />
double dampingMassCoef=0.0, double dampingStiffnessCoef=0.0)<br />
Initializes the number <strong>of</strong> degrees <strong>of</strong> freedom r, the timestep, the mass matrix, which degrees <strong>of</strong> freedom<br />
are constrained, and the ForceModel. The internal damping SparseMatrix is set to zero.<br />
virtual void SetForceModel(ForceModel * forceModel)<br />
Sets the ForceModel object to forceModel. This makes it possible to change the force model at runtime.<br />
virtual void SetDampingMatrix(SparseMatrix * dampingMatrix)<br />
Sets the damping matrix D to dampingMatrix. This matrix will be added to the matrix produced<br />
according to the mass and stiffness damping coefficients to get the total damping matrix for the simulation.<br />
virtual double GetForceAssemblyTime()<br />
virtual double GetSystemSolveTime()<br />
13