6#include "RigidElement.h"
7#include "SparseMatrixBuilder.h"
8#include "ConjugateGradient.h"
35 ConstraintSolver(
double TimeConstant,
int numThreads,
bool no_hyperthreading =
false);
39 void UpdateElements(
const double T,
const double *
const X);
40 void ComputeDynamic(
const double T,
const double *
const X,
const Eigen::Matrix<double,Eigen::Dynamic,1>& External_Force);
41 void ComputeDynamic(
const double T,
const double *
const X);
42 void WriteDynamic(
const double *
const X,
double *
const XDot);
45 void SetSymplecticStepSize(
double h);
46 double GetSymplecticStepSize();
47 double ComputeKineticEnergy(
const double T,
const double *
const X);
48 int NumElements(){
return (
int)
m_element.size();}
53 void setConstraintSetPriority(
ConstraintSet* constraintSet,
int priority);
60 void Initialize(
double TimeConstant);
61 void ComputeDynamicInternal(
const double T,
const double *
const X,
const Vector* External_Force);
72 std::mutex* m_ForceVectorLocks;
78 std::mutex m_ConstraintPoolLock;
80 double m_TimeConstant;
82 bool m_elements_updated;
94 void SetStates(
double T,
const double* X);
103 std::map<int,std::vector<ConstraintSetTask> > m_ConstraintSet;
104 std::map<ConstraintSet*,int> m_priority_index;
112 void init(
int start_index,
int end_index,
SparseMatrixBuilder* MatrixBuilder, Vector* Force, std::vector<RigidElement*>* element);
113 void ComputeSubDomain(
double T,
const double *
const X);
125 std::vector<SubDomainInertiaTask> m_InertiaComputers;
133 void init(
int start_index,
int end_index, std::vector<RigidElement*>* element, Vector* SecondDerivatives,
double symplecticH,
double TimeConstant);
134 void ComputeSubDomain(
double * XDot);
140 Vector* m_SecondDerivatives;
142 double m_symplecticH;
143 double m_TimeConstant;
145 std::vector<SubDomainWriteDynamic> m_WriteDynamic;
Definition: ConjugateGradient.h:12
Definition: ConstraintSet.h:24
Definition: ConstraintSolver.h:90
Definition: ConstraintSolver.h:110
std::vector< RigidElement * > * m_element
end index
Definition: ConstraintSolver.h:118
int m_ix1
start index
Definition: ConstraintSolver.h:117
Definition: ConstraintSolver.h:131
std::vector< RigidElement * > * m_element
end index
Definition: ConstraintSolver.h:139
int m_ix1
start index
Definition: ConstraintSolver.h:138
Definition: ConstraintSolver.h:31
std::vector< RigidElement * > m_element
adds a constraint set to the global constraint system. Only the constraint sets themselves are allowe...
Definition: ConstraintSolver.h:66
SparseMatrixBuilder * m_MatrixBuilder
F_external - M_dot·V + F_constraint.
Definition: ConstraintSolver.h:75
void addForceThreadSafe(int element, const vec6 &Force)
Computed second derivatives.
void PrintElement(int index)
set computation order priority for this constraint set
Vector m_SecondDerivatives
list of all 6DOF rigid elements in the system
Definition: ConstraintSolver.h:68
Definition: AsynchronousTask.h:20
Definition: AsynchronousTask.h:15
Definition: RigidElement.h:15
Definition: SparseMatrixBuilder.h:34
Definition: CollisionManager.h:6