20#ifndef _DYNAMIC_SYSTEM_SOLVER_H_
21#define _DYNAMIC_SYSTEM_SOLVER_H_
23#include "mbsim/group.h"
24#include "fmatvec/sparse_matrix.h"
25#include "mbsim/functions/function.h"
26#include "mbsim/environment.h"
33 class MBSimEnvironment;
34 class MultiDimNewtonMethod;
35 class ConstraintResiduum;
36 class ConstraintJacobian;
43 StateTable(
const std::string &name_,
char label_,
int number_) : name(name_), label(label_), number(number_) { }
66 fmatvec::Vec operator()(
const fmatvec::Vec &
z);
76 enum Solver { fixedpoint, GaussSeidel, direct, rootfinding, unknownSolver, directNonlinear };
136 void setTruncateSimulationFiles(
bool trunc) { truncateSimulationFiles=trunc; }
142 void init(
InitStage stage,
const InitConfigSet &config)
override;
158 void updateT()
override;
159 void updateh(
int i=0)
override;
160 void updateM()
override;
161 void updateLLM()
override;
162 void updatezd()
override;
177 void updater(
int j=0)
override;
178 void updateJrla(
int j=0)
override;
179 virtual void updaterdt();
180 void updatewb()
override;
181 void updateg()
override;
182 void updategd()
override;
183 void updateW(
int j=0)
override;
184 void updateV(
int j=0)
override;
185 virtual void updatebc();
186 virtual void updatebi();
187 virtual void updatela();
188 virtual void updateLa();
197 void setConstraintSolver(
Solver solver_) { contactSolver = solver_; }
198 void setImpactSolver(
Solver solver_) { impactSolver = solver_; }
200 const Solver& getConstraintSolver() {
return contactSolver; }
201 const Solver& getImpactSolver() {
return impactSolver; }
202 void setTermination(
bool term_) {
term = term_; }
203 void setMaximumNumberOfIterations(
int iter) {
maxIter = iter; }
204 void setHighNumberOfIterations(
int iter) { highIter = iter; }
205 void setNumericalJacobian(
bool numJac_) {
numJac = numJac_; }
206 void setMaximumDampingSteps(
int maxDSteps) { maxDampingSteps = maxDSteps; }
207 void setLevenbergMarquardtParamater(
double lmParm_) {
lmParm = lmParm_; }
209 void setUseOldla(
bool flag) {
useOldla = flag; }
210 void setDecreaseLevels(
const fmatvec::VecInt &decreaseLevels_) {
decreaseLevels = decreaseLevels_; }
211 void setCheckTermLevels(
const fmatvec::VecInt &checkTermLevels_) {
checkTermLevels = checkTermLevels_; }
212 void setCheckGSize(
bool checkGSize_) {
checkGSize = checkGSize_; }
215 double& getTime() {
return t; }
216 const double& getTime()
const {
return t; }
217 void setTime(
double t_) {
t = t_; }
219 double getStepSize()
const {
return dt; }
220 void setStepSize(
double dt_) {
dt = dt_; }
222 int getzSize()
const {
return zSize; }
224 fmatvec::Vec& getState() {
return z; }
225 const fmatvec::Vec& getState()
const {
return z; }
226 void setState(
const fmatvec::Vec &z_) {
z = z_; }
228 const fmatvec::Vec& getzd(
bool check=
true)
const { assert((not check) or (not updzd));
return zd; }
229 void setzd(
const fmatvec::Vec &zd_) {
zd = zd_; }
231 const fmatvec::SqrMat& getG(
bool check=
true)
const { assert((not check) or (not updG));
return G; }
232 const fmatvec::SparseMat& getGs(
bool check=
true)
const { assert((not check) or (not updG));
return Gs; }
233 const fmatvec::Vec& getbc(
bool check=
true)
const { assert((not check) or (not updbc));
return bc; }
234 const fmatvec::Vec& getbi(
bool check=
true)
const { assert((not check) or (not updbi));
return bi; }
235 const fmatvec::SqrMat& getJprox()
const {
return Jprox; }
236 fmatvec::SqrMat& getG(
bool check=
true) { assert((not check) or (not updG));
return G; }
237 fmatvec::SparseMat& getGs(
bool check=
true) { assert((not check) or (not updG));
return Gs; }
238 fmatvec::Vec& getbc(
bool check=
true) { assert((not check) or (not updbc));
return bc; }
239 fmatvec::Vec& getbi(
bool check=
true) { assert((not check) or (not updbi));
return bi; }
240 fmatvec::SqrMat& getJprox() {
return Jprox; }
241 const fmatvec::Vec& getr(
int j=0,
bool check=
true)
const { assert((not check) or (not updr[j]));
return r[j]; }
242 fmatvec::Vec& getr(
int j=0,
bool check=
true) { assert((not check) or (not updr[j]));
return r[j]; }
245 const fmatvec::Mat& getJrla(
int j=0,
bool check=
true)
const { assert((not check) or (not updJrla[j]));
return Jrla[j]; }
246 fmatvec::Mat& getJrla(
int j=0,
bool check=
true) { assert((not check) or (not updJrla[j]));
return Jrla[j]; }
248 const fmatvec::Vec& evaldq() {
if(upddq) updatedq();
return dq; }
249 const fmatvec::Vec& evaldu() {
if(upddu) updatedu();
return du; }
250 const fmatvec::Vec& evaldx() {
if(upddx) updatedx();
return dx; }
251 const fmatvec::Vec& evalzd();
252 const fmatvec::SqrMat& evalG() {
if(updG)
updateG();
return G; }
253 const fmatvec::SparseMat& evalGs() {
if(updG)
updateG();
return Gs; }
254 const fmatvec::Vec& evalbc() {
if(updbc) updatebc();
return bc; }
255 const fmatvec::Vec& evalbi() {
if(updbi) updatebi();
return bi; }
256 const fmatvec::Vec& evalsv();
257 const fmatvec::Vec& evalz0();
258 const fmatvec::Vec& evalla() {
if(updla) updatela();
return la; }
259 const fmatvec::Vec& evalLa() {
if(updLa) updateLa();
return La; }
261 fmatvec::Vec& getzParent() {
return zParent; }
262 fmatvec::Vec& getzdParent() {
return zdParent; }
263 fmatvec::Vec& getlaParent() {
return laParent; }
264 fmatvec::Vec& getLaParent() {
return LaParent; }
268 fmatvec::Mat& getWParent(
int i=0) {
return WParent[i]; }
269 fmatvec::Mat& getVParent(
int i=0) {
return VParent[i]; }
273 fmatvec::Vec& getgParent() {
return gParent; }
275 fmatvec::Vec& getgdParent() {
return gdParent; }
276 fmatvec::Vec& getresParent() {
return resParent; }
279 void resizezParent(
int nz) {
zParent.resize(nz); }
280 void resizezdParent(
int nz) {
zdParent.resize(nz); }
283 int getMaxIter() {
return maxIter;}
284 int getHighIter() {
return highIter;}
285 int getIterC() {
return iterc;}
286 int getIterI() {
return iteri;}
294 int (DynamicSystemSolver::*solveSmooth_)();
331 int solveImpactsNonlinearEquations();
350 virtual const fmatvec::Vec&
shift(std::optional<std::reference_wrapper<bool>> &&velProjWasCalled={},
351 std::optional<std::reference_wrapper<bool>> &&posProjWasCalled={});
357 void getLinkStatus(fmatvec::VecInt &LinkStatusExt);
363 void getLinkStatusReg(fmatvec::VecInt &LinkStatusRegExt);
448 using SigHandle = void (*)(int);
453 SigHandle oldSigTerm;
460 static void throwIfExitRequested(
bool silent=
false) {
462 if(!silent && !silentExit) {
463 msgStatic(fmatvec::Atom::Error)<<
"User requested a exit (throw exception now)."<<std::endl;
464 throw std::runtime_error(
"Exception due to user requested exit.");
466 msgStatic(fmatvec::Atom::Info)<<
"User requested a silent exit (throw exception now)."<<std::endl;
472 void setPartialEventDrivenSolver(
bool peds_) {
peds = peds_; }
479 void writez(std::string fileName,
bool formatH5=
true);
480 using DynamicSystem::writez;
493 void readz0(std::string fileName);
494 using DynamicSystem::readz0;
496 void initializeUsingXML(xercesc::DOMElement *element)
override;
516 double getDynamicSystemSolverTolerance() {
return tolDSS; }
530 void setAlwaysConsiderContact(
bool alwaysConsiderContact_) { alwaysConsiderContact = alwaysConsiderContact_; }
532 void setInverseKinetics(
bool inverseKinetics_) { inverseKinetics = inverseKinetics_; }
533 bool getInverseKinetics()
const {
return inverseKinetics; }
535 void setInitialProjection(
bool initialProjection_) { initialProjection = initialProjection_; }
536 bool getInitialProjection()
const {
return initialProjection; }
538 void setDetermineEquilibriumState(
bool determineEquilibriumState_) { determineEquilibriumState = determineEquilibriumState_; }
539 bool getDetermineEquilibriumState()
const {
return determineEquilibriumState; }
541 void setUseConstraintSolverForPlot(
bool useConstraintSolverForPlot_) { useConstraintSolverForPlot = useConstraintSolverForPlot_; }
542 bool getUseConstraintSolverForPlot()
const {
return useConstraintSolverForPlot; }
544 fmatvec::Mat dhdq(
int lb=0,
int ub=0);
545 fmatvec::Mat dhdu(
int lb=0,
int ub=0);
549 void setRootID(
int ID) {rootID = ID;}
550 int getRootID()
const {
return rootID;}
552 void resetUpToDate()
override;
554 bool getUpdateT() {
return updT; }
555 bool getUpdateM() {
return updM; }
556 bool getUpdateLLM() {
return updLLM; }
557 bool getUpdateh(
int j) {
return updh[j]; }
558 bool getUpdater(
int j) {
return updr[j]; }
559 bool getUpdateJrla(
int j) {
return updJrla[j]; }
560 bool getUpdaterdt() {
return updrdt; }
561 bool getUpdateW(
int j) {
return updW[j]; }
562 bool getUpdateV(
int j) {
return updV[j]; }
563 bool getUpdatewb() {
return updwb; }
564 bool getUpdateg() {
return updg; }
565 bool getUpdategd() {
return updgd; }
566 bool getUpdatela() {
return updla; }
567 bool getUpdateLa() {
return updLa; }
568 bool getUpdatezd() {
return updzd; }
569 bool getUpdatedq() {
return upddq; }
570 bool getUpdatedu() {
return upddu; }
571 bool getUpdatedx() {
return upddx; }
572 void setUpdatela(
bool updla_) { updla = updla_; }
573 void setUpdateLa(
bool updLa_) { updLa = updLa_; }
574 void setUpdateG(
bool updG_) { updG = updG_; }
575 void setUpdatebi(
bool updbi_) { updbi = updbi_; }
576 void setUpdatebc(
bool updbc_) { updbc = updbc_; }
577 void setUpdatezd(
bool updzd_) { updzd = updzd_; }
578 void setUpdateW(
bool updW_,
int i=0) { updW[i] = updW_; }
617 void updatedq()
override;
618 void updatedu()
override;
619 void updatedx()
override;
621 void updateStopVector()
override;
623 void updateInternalState();
625 void plot()
override;
640 std::vector<StateTable>& getStateTable() {
return tabz; }
642 void setCompressionLevel(
int level) { compressionLevel=level; }
643 void setChunkSize(
int size) { chunkSize=size; }
644 void setCacheSize(
int size) { cacheSize=size; }
646 void setqdequ(
bool qdequ_) { qdequ = qdequ_; }
647 bool getqdequ() {
return qdequ; }
650 static void interrupt(
bool silent=
false);
728 fmatvec::Vec curisParent, nextisParent;
750 fmatvec::Vec dxParent, dqParent, duParent;
762 fmatvec::Mat JrlaParent[2];
788 fmatvec::SparseMat
Gs;
813 int maxIter, highIter, maxDampingSteps, iterc, iteri;
888 fmatvec::Vec laInverseKineticsParent;
889 fmatvec::Mat bInverseKineticsParent;
894 fmatvec::Mat WInverseKineticsParent;
896 bool alwaysConsiderContact;
897 bool inverseKinetics;
898 bool initialProjection;
899 bool determineEquilibriumState;
900 bool useConstraintSolverForPlot;
902 fmatvec::Vec corrParent;
906 double gTol, gdTol, gddTol, laTol, LaTol;
908 bool updT, updh[2], updr[2], updJrla[2], updrdt, updM, updLLM, updW[2], updV[2], updwb, updg, updgd, updG, updbc, updbi, updsv, updzd, updla, updLa, upddq, upddu, upddx;
910 bool useSmoothSolver;
914 std::vector<StateTable> tabz;
916 int compressionLevel { H5::File::getDefaultCompression() };
917 int chunkSize { H5::File::getDefaultChunkSize() };
918 int cacheSize { H5::File::getDefaultCacheSize() };
936 static_assert(
decltype(
exitRequest)::is_always_lock_free);
938 static std::atomic<bool> silentExit;
953 void addToGraph(
Graph* graph, fmatvec::SqrMat &A,
int i, std::vector<Element*> &objList);
955 bool truncateSimulationFiles;
956 bool embedOmbvxInH5 {
false };
963 std::vector<DynamicSystem*> dynamicsystemPreReorganize;
967 std::vector<std::unique_ptr<Environment>> environments;
970 bool firstPlot {
true };
972 std::unique_ptr<MultiDimNewtonMethod> nonlinearConstraintNewtonSolver;
973 std::unique_ptr<ConstraintResiduum> constraintResiduum;
974 std::unique_ptr<ConstraintJacobian> constraintJacobian;
980 auto &reqType=
typeid(Env);
981 for(
auto &e : environments) {
983 if(reqType==
typeid(e_))
984 return static_cast<Env*
>(e.get());
987 addEnvironment(newEnv);
Definition: dynamic_system_solver.h:63
Definition: dynamic_system_solver.h:442
solver interface for modelling and simulation of dynamic systems
Definition: dynamic_system_solver.h:61
void checkConstraintsForTermination() override
validate force laws concerning given tolerances
Definition: dynamic_system_solver.cc:744
fmatvec::Vec sParent
TODO.
Definition: dynamic_system_solver.h:721
int(DynamicSystemSolver::* solveImpacts_)()
function pointer for election of prox-solver for impact equations on velocity level
Definition: dynamic_system_solver.h:307
void plot() override
plots time dependent data
Definition: dynamic_system_solver.cc:1781
bool term
boolean to check for termination of contact equations solution
Definition: dynamic_system_solver.h:808
int solveConstraintsFixpointSingle() override
solve contact equations with single step fixed point scheme
Definition: dynamic_system_solver.cc:512
void computeInitialCondition()
compute initial condition for links for event driven integrator
Definition: dynamic_system_solver.cc:919
fmatvec::Vec hParent[2]
smooth, smooth with respect to objects, smooth with respect to links right hand side
Definition: dynamic_system_solver.h:755
void setProjectionTolerance(double tol)
set tolerance for projection of generalized position
Definition: dynamic_system_solver.h:502
fmatvec::Vec zd
derivative of state vector
Definition: dynamic_system_solver.h:676
bool useOldla
flag if contac force parameter of last time step should be used
Definition: dynamic_system_solver.h:838
fmatvec::Mat WParent[2]
contact force directions
Definition: dynamic_system_solver.h:696
fmatvec::VecInt LinkStatusParent
status vector of set valued links with piecewise link equation (which piece is valid)
Definition: dynamic_system_solver.h:777
fmatvec::Vec bc
TODO.
Definition: dynamic_system_solver.h:803
int solveConstraintsLinearEquations()
solution of contact equations with direct linear solver using minimum of least squares
Definition: dynamic_system_solver.cc:969
void setLocalSolverTolerance(double tol)
set tolerance for local none-linear solver (solvers on element level), like the Newton-Solver in Join...
Definition: dynamic_system_solver.h:508
fmatvec::SqrMat Jprox
JACOBIAN of contact equations for Newton scheme.
Definition: dynamic_system_solver.h:793
void initialize()
Initialize the system.
Definition: dynamic_system_solver.cc:113
void updateWRef(fmatvec::Mat &ref, int i=0) override
references to contact force direction matrix of dynamic system parent
Definition: dynamic_system_solver.h:603
fmatvec::Mat VParent[2]
condensed contact force directions
Definition: dynamic_system_solver.h:701
double lmParm
Levenberg-Marquard parameter.
Definition: dynamic_system_solver.h:818
fmatvec::Vec gParent
relative distances
Definition: dynamic_system_solver.h:733
virtual void updatelaInverseKinetics()
update inverse kinetics constraint forces
Definition: dynamic_system_solver.cc:1701
fmatvec::Vec z
state vector
Definition: dynamic_system_solver.h:671
bool peds
TODO, flag for occuring impact and sticking in event driven solver.
Definition: dynamic_system_solver.h:868
static void sigInterruptHandler(int)
handler for user interrupt signal Set the DSS flag exitRequest to true.
Definition: dynamic_system_solver.cc:1387
void writeStateTable(std::string fileName)
writes state table to a file
Definition: dynamic_system_solver.cc:1418
bool numJac
flag if Jacobian for Newton scheme should be calculated numerically
Definition: dynamic_system_solver.h:843
void saveLa()
save contact impulses for use as starting value in next time step
Definition: dynamic_system_solver.cc:1282
fmatvec::Vec wbParent
TODO.
Definition: dynamic_system_solver.h:706
double t
time
Definition: dynamic_system_solver.h:656
Solver smoothSolver
solver for contact equations and impact equations
Definition: dynamic_system_solver.h:823
int solveConstraintsRootFinding() override
solve contact equations with Newton scheme
Definition: dynamic_system_solver.cc:612
double tolProj
Tolerance for projection of generalized position.
Definition: dynamic_system_solver.h:873
void updater(int j=0) override
update smooth link force law
Definition: dynamic_system_solver.cc:868
fmatvec::Vec resParent
residuum of contact equations
Definition: dynamic_system_solver.h:726
int(DynamicSystemSolver::* solveConstraints_)()
Definition: dynamic_system_solver.h:300
bool dropContactInfo
flag if contact matrices for debugging should be dropped in no-convergence case
Definition: dynamic_system_solver.h:833
fmatvec::VecInt decreaseLevels
decreasing relaxation factors is done in levels containing the number of contact iterations as condit...
Definition: dynamic_system_solver.h:848
fmatvec::VecInt checkTermLevels
TODO.
Definition: dynamic_system_solver.h:853
bool READZ0
is a state read from a file
Definition: dynamic_system_solver.h:943
int solveConstraintsGaussSeidel() override
solve contact equations with Gauss-Seidel scheme
Definition: dynamic_system_solver.cc:572
fmatvec::SqrMat G
mass action matrix
Definition: dynamic_system_solver.h:798
std::string getSolverInfo()
Definition: dynamic_system_solver.cc:1331
int solveConstraintsNonlinearEquations()
solution of contact equations with direct nonlinear newton solver using minimum of least squares in e...
Definition: dynamic_system_solver.cc:988
fmatvec::VecInt LinkStatusRegParent
status vector of single valued links
Definition: dynamic_system_solver.h:783
void updategRef(fmatvec::Vec &ref) override
references to relative distances of dynamic system parent
Definition: dynamic_system_solver.h:584
void updatezRef(fmatvec::Vec &ext)
references to external state
Definition: dynamic_system_solver.cc:1437
void setStopIfNoConvergence(bool flag, bool dropInfo=false)
Definition: dynamic_system_solver.h:431
int solveImpactsLinearEquations()
solution of contact equations with Cholesky decomposition on velocity level
Definition: dynamic_system_solver.cc:998
void writez(std::string fileName, bool formatH5=true)
writes state to a file
Definition: dynamic_system_solver.cc:1396
void addToGraph(Graph *graph, fmatvec::SqrMat &A, int i, std::vector< Element * > &objList)
adds list of objects to tree
Definition: dynamic_system_solver.cc:1584
int solveImpactsRootFinding() override
solve impact equations with Newton scheme on velocity level
Definition: dynamic_system_solver.cc:679
static std::atomic< bool > exitRequest
boolean flags to store a user requested interruption
Definition: dynamic_system_solver.h:935
~DynamicSystemSolver() override
destructor
Definition: dynamic_system_solver.cc:105
double tolLocalSolver
Tolerance for local none-linear solvers (solvers on element level)
Definition: dynamic_system_solver.h:878
void updatezdRef(fmatvec::Vec &ext)
references to differentiated external state
Definition: dynamic_system_solver.cc:1449
void addElement(Element *element_)
Definition: dynamic_system_solver.cc:1292
void checkImpactsForTermination() override
validate force laws concerning given tolerances on velocity level
Definition: dynamic_system_solver.cc:755
bool positionDriftCompensationNeeded(double gmax)
check if drift compensation on position level is needed
Definition: dynamic_system_solver.cc:1130
fmatvec::Vec gdParent
relative velocities
Definition: dynamic_system_solver.h:738
DynamicSystemSolver(const std::string &name="")
constructor
Definition: dynamic_system_solver.cc:94
MBSimEnvironment * getMBSimEnvironment()
Definition: dynamic_system_solver.cc:1824
Env * getEnvironment()
Definition: dynamic_system_solver.h:978
fmatvec::Vec zParent
state
Definition: dynamic_system_solver.h:743
bool stopIfNoConvergence
flag if the contact equations should be stopped if there is no convergence
Definition: dynamic_system_solver.h:828
fmatvec::Vec laParent
contact force parameters
Definition: dynamic_system_solver.h:711
void projectGeneralizedPositions(int mode, bool fullUpdate=false)
drift projection for positions
Definition: dynamic_system_solver.cc:1156
fmatvec::SymMat LLMParent
Cholesky decomposition of mass matrix.
Definition: dynamic_system_solver.h:686
fmatvec::Vec rFactorParent
relaxation parameters for contact equations
Definition: dynamic_system_solver.h:716
void init(InitStage stage, const InitConfigSet &config) override
plots time series header
Definition: dynamic_system_solver.cc:130
Element * getElement(const std::string &name)
Definition: dynamic_system_solver.cc:1304
fmatvec::Vec svParent
stopvector (rootfunctions for event driven integration
Definition: dynamic_system_solver.h:767
void constructor()
set plot feature default values
Definition: dynamic_system_solver.cc:1463
double dt
step size
Definition: dynamic_system_solver.h:661
int zSize
size of state vector
Definition: dynamic_system_solver.h:666
fmatvec::Mat TParent
matrix of linear relation between differentiated positions and velocities
Definition: dynamic_system_solver.h:691
void updategdRef(fmatvec::Vec &ref) override
references to relative velocities of dynamic system parent
Definition: dynamic_system_solver.h:590
virtual const fmatvec::Vec & shift(std::optional< std::reference_wrapper< bool > > &&velProjWasCalled={}, std::optional< std::reference_wrapper< bool > > &&posProjWasCalled={})
update for event driven integrator for event
Definition: dynamic_system_solver.cc:1597
virtual void updateG()
updates mass action matrix
Definition: dynamic_system_solver.cc:1007
void updateVRef(fmatvec::Mat &ref, int i=0) override
references to condensed contact force direction matrix of dynamic system parent
Definition: dynamic_system_solver.h:610
fmatvec::Vec zdParent
differentiated state
Definition: dynamic_system_solver.h:748
void setDynamicSystemSolverTolerance(double tol)
set tolerance for global none-linear solver (solvers on DynamicSystemSolver level),...
Definition: dynamic_system_solver.h:515
void initla()
load contact forces for use as starting value
Definition: dynamic_system_solver.cc:1277
void readz0(std::string fileName)
reads state from a file
Definition: dynamic_system_solver.cc:1429
fmatvec::SparseMat Gs
sparse mass action matrix
Definition: dynamic_system_solver.h:788
void updatewbRef(fmatvec::Vec &ref) override
references to TODO of dynamic system parent
Definition: dynamic_system_solver.h:596
fmatvec::SymMat MParent
mass matrix
Definition: dynamic_system_solver.h:681
void dropContactMatrices()
Definition: dynamic_system_solver.cc:1348
static void interrupt(bool silent=false)
Definition: dynamic_system_solver.cc:1391
bool velocityDriftCompensationNeeded(double gdmax)
check if drift compensation on velocity level is needed
Definition: dynamic_system_solver.cc:1143
fmatvec::VecInt jsvParent
boolean evaluation of stopvector
Definition: dynamic_system_solver.h:772
int solveImpactsFixpointSingle() override
solve impact equations with single step fixed point scheme on velocity level
Definition: dynamic_system_solver.cc:542
fmatvec::Vec rParent[2]
nonsmooth right hand side
Definition: dynamic_system_solver.h:760
Solver
solver for contact equations
Definition: dynamic_system_solver.h:76
double tolDSS
Tolerance for global none-linear solvers (solvers on DynamicSystemSolver level)
Definition: dynamic_system_solver.h:883
int maxIter
maximum number of contact iterations, high number of contact iterations for warnings,...
Definition: dynamic_system_solver.h:813
int solveImpactsGaussSeidel() override
solve impact equations with Gauss-Seidel scheme on velocity level
Definition: dynamic_system_solver.cc:592
void projectGeneralizedVelocities(int mode)
drift projection for positions
Definition: dynamic_system_solver.cc:1223
bool checkGSize
boolean if force action matrix should be resized in each step
Definition: dynamic_system_solver.h:858
void initLa()
load contact impulses for use as starting value
Definition: dynamic_system_solver.cc:1287
void setEmbedOmbvxInH5(bool flag)
If true the ombvx XML file in embedded in the ombvh5 file.
Definition: dynamic_system_solver.h:139
void savela()
save contact forces for use as starting value in next time step
Definition: dynamic_system_solver.cc:1272
int limitGSize
TODO.
Definition: dynamic_system_solver.h:863
void decreaserFactors()
decrease relaxation factors if mass action matrix is not diagonal dominant
Definition: dynamic_system_solver.cc:1108
virtual void updatewbRef(fmatvec::Vec &wbParent)
references to TODO of dynamic system parent
Definition: dynamic_system.cc:854
void plot() override
plots time dependent data
Definition: dynamic_system.cc:369
fmatvec::Mat Jrla[2]
Jacobian dr/dla.
Definition: dynamic_system.h:868
fmatvec::Vec la
contact force parameters
Definition: dynamic_system.h:878
virtual void updateVRef(fmatvec::Mat &VParent, int j=0)
references to condensed contact force direction matrix of dynamic system parent
Definition: dynamic_system.cc:882
virtual void updateWRef(fmatvec::Mat &WParent, int j=0)
references to contact force direction matrix of dynamic system parent
Definition: dynamic_system.cc:861
virtual void updategRef(fmatvec::Vec &gParent)
references to relative distances of dynamic system parent
Definition: dynamic_system.cc:819
virtual void updategdRef(fmatvec::Vec &gdParent)
references to relative velocities of dynamic system parent
Definition: dynamic_system.cc:826
Element(const std::string &name)
constructor
Definition: element.cc:64
InitStage
The stages of the initialization.
Definition: element.h:63
std::string name
name of element
Definition: element.h:263
Definition: environment.h:37
Definition: function.h:53
class for tree-structured mechanical systems with recursive and flat memory mechanism
Definition: graph.h:36
group ingredients do not depend on each other
Definition: group.h:35
Definition: environment.h:59
Definition: mbsim_event.h:79
solver-interface for dynamic systems
Definition: solver.h:38
namespace MBSim
Definition: bilateral_constraint.cc:30
Definition: dynamic_system_solver.h:38