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; }
139 void init(
InitStage stage,
const InitConfigSet &config)
override;
155 void updateT()
override;
156 void updateh(
int i=0)
override;
157 void updateM()
override;
158 void updateLLM()
override;
159 void updatezd()
override;
175 virtual void updateJrla(
int j=0);
176 virtual void updaterdt();
177 void updatewb()
override;
178 void updateg()
override;
179 void updategd()
override;
180 void updateW(
int j=0)
override;
181 void updateV(
int j=0)
override;
182 virtual void updatebc();
183 virtual void updatebi();
184 virtual void updatela();
185 virtual void updateLa();
194 void setConstraintSolver(
Solver solver_) { contactSolver = solver_; }
195 void setImpactSolver(
Solver solver_) { impactSolver = solver_; }
197 const Solver& getConstraintSolver() {
return contactSolver; }
198 const Solver& getImpactSolver() {
return impactSolver; }
199 void setTermination(
bool term_) {
term = term_; }
200 void setMaximumNumberOfIterations(
int iter) {
maxIter = iter; }
201 void setHighNumberOfIterations(
int iter) { highIter = iter; }
202 void setNumericalJacobian(
bool numJac_) {
numJac = numJac_; }
203 void setMaximumDampingSteps(
int maxDSteps) { maxDampingSteps = maxDSteps; }
204 void setLevenbergMarquardtParamater(
double lmParm_) {
lmParm = lmParm_; }
206 void setUseOldla(
bool flag) {
useOldla = flag; }
207 void setDecreaseLevels(
const fmatvec::VecInt &decreaseLevels_) {
decreaseLevels = decreaseLevels_; }
208 void setCheckTermLevels(
const fmatvec::VecInt &checkTermLevels_) {
checkTermLevels = checkTermLevels_; }
209 void setCheckGSize(
bool checkGSize_) {
checkGSize = checkGSize_; }
212 double& getTime() {
return t; }
213 const double& getTime()
const {
return t; }
214 void setTime(
double t_) {
t = t_; }
216 double getStepSize()
const {
return dt; }
217 void setStepSize(
double dt_) {
dt = dt_; }
219 int getzSize()
const {
return zSize; }
221 fmatvec::Vec& getState() {
return z; }
222 const fmatvec::Vec& getState()
const {
return z; }
223 void setState(
const fmatvec::Vec &z_) {
z = z_; }
225 const fmatvec::Vec& getzd(
bool check=
true)
const { assert((not check) or (not updzd));
return zd; }
226 void setzd(
const fmatvec::Vec &zd_) {
zd = zd_; }
228 const fmatvec::SqrMat& getG(
bool check=
true)
const { assert((not check) or (not updG));
return G; }
229 const fmatvec::SparseMat& getGs(
bool check=
true)
const { assert((not check) or (not updG));
return Gs; }
230 const fmatvec::Vec& getbc(
bool check=
true)
const { assert((not check) or (not updbc));
return bc; }
231 const fmatvec::Vec& getbi(
bool check=
true)
const { assert((not check) or (not updbi));
return bi; }
232 const fmatvec::SqrMat& getJprox()
const {
return Jprox; }
233 fmatvec::SqrMat& getG(
bool check=
true) { assert((not check) or (not updG));
return G; }
234 fmatvec::SparseMat& getGs(
bool check=
true) { assert((not check) or (not updG));
return Gs; }
235 fmatvec::Vec& getbc(
bool check=
true) { assert((not check) or (not updbc));
return bc; }
236 fmatvec::Vec& getbi(
bool check=
true) { assert((not check) or (not updbi));
return bi; }
237 fmatvec::SqrMat& getJprox() {
return Jprox; }
238 const fmatvec::Vec& getr(
int j=0,
bool check=
true)
const { assert((not check) or (not updr[j]));
return r[j]; }
239 fmatvec::Vec& getr(
int j=0,
bool check=
true) { assert((not check) or (not updr[j]));
return r[j]; }
242 const fmatvec::Mat& getJrla(
int j=0,
bool check=
true)
const { assert((not check) or (not updJrla[j]));
return Jrla[j]; }
243 fmatvec::Mat& getJrla(
int j=0,
bool check=
true) { assert((not check) or (not updJrla[j]));
return Jrla[j]; }
245 const fmatvec::Vec& evaldq() {
if(upddq) updatedq();
return dq; }
246 const fmatvec::Vec& evaldu() {
if(upddu) updatedu();
return du; }
247 const fmatvec::Vec& evaldx() {
if(upddx) updatedx();
return dx; }
248 const fmatvec::Vec& evalzd();
249 const fmatvec::SqrMat& evalG() {
if(updG)
updateG();
return G; }
250 const fmatvec::SparseMat& evalGs() {
if(updG)
updateG();
return Gs; }
251 const fmatvec::Vec& evalbc() {
if(updbc) updatebc();
return bc; }
252 const fmatvec::Vec& evalbi() {
if(updbi) updatebi();
return bi; }
253 const fmatvec::Vec& evalsv();
254 const fmatvec::Vec& evalz0();
255 const fmatvec::Vec& evalla() {
if(updla) updatela();
return la; }
256 const fmatvec::Vec& evalLa() {
if(updLa) updateLa();
return La; }
258 fmatvec::Vec& getzParent() {
return zParent; }
259 fmatvec::Vec& getzdParent() {
return zdParent; }
260 fmatvec::Vec& getlaParent() {
return laParent; }
261 fmatvec::Vec& getLaParent() {
return LaParent; }
265 fmatvec::Mat& getWParent(
int i=0) {
return WParent[i]; }
266 fmatvec::Mat& getVParent(
int i=0) {
return VParent[i]; }
270 fmatvec::Vec& getgParent() {
return gParent; }
272 fmatvec::Vec& getgdParent() {
return gdParent; }
273 fmatvec::Vec& getresParent() {
return resParent; }
276 void resizezParent(
int nz) {
zParent.resize(nz); }
277 void resizezdParent(
int nz) {
zdParent.resize(nz); }
280 int getMaxIter() {
return maxIter;}
281 int getHighIter() {
return highIter;}
282 int getIterC() {
return iterc;}
283 int getIterI() {
return iteri;}
291 int (DynamicSystemSolver::*solveSmooth_)();
328 int solveImpactsNonlinearEquations();
347 virtual const fmatvec::Vec&
shift(std::optional<std::reference_wrapper<bool>> &&velProjWasCalled={},
348 std::optional<std::reference_wrapper<bool>> &&posProjWasCalled={});
354 void getLinkStatus(fmatvec::VecInt &LinkStatusExt);
360 void getLinkStatusReg(fmatvec::VecInt &LinkStatusRegExt);
444 using SigHandle = void (*)(int);
449 SigHandle oldSigTerm;
453 void throwIfExitRequested() {
455 if(!exitRequestPrinted) {
456 exitRequestPrinted =
true;
457 msg(fmatvec::Atom::Error)<<
"User requested a exit (throw exception now)."<<std::endl;
459 throw std::runtime_error(
"Exception due to user requested exit.");
463 bool exitRequested() {
465 if(!exitRequestPrinted) {
466 exitRequestPrinted =
true;
467 msg(fmatvec::Atom::Error)<<
"User requested a exit (caller will handle this request now)."<<std::endl;
473 void setPartialEventDrivenSolver(
bool peds_) {
peds = peds_; }
480 void writez(std::string fileName,
bool formatH5=
true);
493 void readz0(std::string fileName);
495 void initializeUsingXML(xercesc::DOMElement *element)
override;
515 double getDynamicSystemSolverTolerance() {
return tolDSS; }
529 void setAlwaysConsiderContact(
bool alwaysConsiderContact_) { alwaysConsiderContact = alwaysConsiderContact_; }
531 void setInverseKinetics(
bool inverseKinetics_) { inverseKinetics = inverseKinetics_; }
532 bool getInverseKinetics()
const {
return inverseKinetics; }
534 void setInitialProjection(
bool initialProjection_) { initialProjection = initialProjection_; }
535 bool getInitialProjection()
const {
return initialProjection; }
537 void setDetermineEquilibriumState(
bool determineEquilibriumState_) { determineEquilibriumState = determineEquilibriumState_; }
538 bool getDetermineEquilibriumState()
const {
return determineEquilibriumState; }
540 void setUseConstraintSolverForPlot(
bool useConstraintSolverForPlot_) { useConstraintSolverForPlot = useConstraintSolverForPlot_; }
541 bool getUseConstraintSolverForPlot()
const {
return useConstraintSolverForPlot; }
543 fmatvec::Mat dhdq(
int lb=0,
int ub=0);
544 fmatvec::Mat dhdu(
int lb=0,
int ub=0);
548 void setRootID(
int ID) {rootID = ID;}
549 int getRootID()
const {
return rootID;}
551 void resetUpToDate()
override;
553 bool getUpdateT() {
return updT; }
554 bool getUpdateM() {
return updM; }
555 bool getUpdateLLM() {
return updLLM; }
556 bool getUpdateh(
int j) {
return updh[j]; }
557 bool getUpdater(
int j) {
return updr[j]; }
558 bool getUpdateJrla(
int j) {
return updJrla[j]; }
559 bool getUpdaterdt() {
return updrdt; }
560 bool getUpdateW(
int j) {
return updW[j]; }
561 bool getUpdateV(
int j) {
return updV[j]; }
562 bool getUpdatewb() {
return updwb; }
563 bool getUpdateg() {
return updg; }
564 bool getUpdategd() {
return updgd; }
565 bool getUpdatela() {
return updla; }
566 bool getUpdateLa() {
return updLa; }
567 bool getUpdatezd() {
return updzd; }
568 bool getUpdatedq() {
return upddq; }
569 bool getUpdatedu() {
return upddu; }
570 bool getUpdatedx() {
return upddx; }
571 void setUpdatela(
bool updla_) { updla = updla_; }
572 void setUpdateLa(
bool updLa_) { updLa = updLa_; }
573 void setUpdateG(
bool updG_) { updG = updG_; }
574 void setUpdatebi(
bool updbi_) { updbi = updbi_; }
575 void setUpdatebc(
bool updbc_) { updbc = updbc_; }
576 void setUpdatezd(
bool updzd_) { updzd = updzd_; }
577 void setUpdateW(
bool updW_,
int i=0) { updW[i] = updW_; }
616 void updatedq()
override;
617 void updatedu()
override;
618 void updatedx()
override;
620 void updateStopVector()
override;
622 void updateInternalState();
624 void plot()
override;
639 std::vector<StateTable>& getStateTable() {
return tabz; }
641 void setCompressionLevel(
int level) { compressionLevel=level; }
642 void setChunkSize(
int size) { chunkSize=size; }
643 void setCacheSize(
int size) { cacheSize=size; }
645 void setqdequ(
bool qdequ_) { qdequ = qdequ_; }
646 bool getqdequ() {
return qdequ; }
724 fmatvec::Vec curisParent, nextisParent;
746 fmatvec::Vec dxParent, dqParent, duParent;
758 fmatvec::Mat JrlaParent[2];
784 fmatvec::SparseMat
Gs;
809 int maxIter, highIter, maxDampingSteps, iterc, iteri;
884 fmatvec::Vec laInverseKineticsParent;
885 fmatvec::Mat bInverseKineticsParent;
890 fmatvec::Mat WInverseKineticsParent;
892 bool alwaysConsiderContact;
893 bool inverseKinetics;
894 bool initialProjection;
895 bool determineEquilibriumState;
896 bool useConstraintSolverForPlot;
898 fmatvec::Vec corrParent;
902 double gTol, gdTol, gddTol, laTol, LaTol;
904 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;
906 bool useSmoothSolver;
910 std::vector<StateTable> tabz;
912 int compressionLevel { H5::File::getDefaultCompression() };
913 int chunkSize { H5::File::getDefaultChunkSize() };
914 int cacheSize { H5::File::getDefaultCacheSize() };
931 static_assert(
decltype(
exitRequest)::is_always_lock_free);
932 bool exitRequestPrinted;
947 void addToGraph(
Graph* graph, fmatvec::SqrMat &A,
int i, std::vector<Element*> &objList);
949 bool truncateSimulationFiles;
956 std::vector<DynamicSystem*> dynamicsystemPreReorganize;
960 std::vector<std::unique_ptr<Environment>> environments;
963 bool firstPlot {
true };
965 std::unique_ptr<MultiDimNewtonMethod> nonlinearConstraintNewtonSolver;
966 std::unique_ptr<ConstraintResiduum> constraintResiduum;
967 std::unique_ptr<ConstraintJacobian> constraintJacobian;
973 auto &reqType=
typeid(Env);
974 for(
auto &e : environments) {
976 if(reqType==
typeid(e_))
977 return static_cast<Env*
>(e.get());
980 addEnvironment(newEnv);
Definition: dynamic_system_solver.h:63
Definition: dynamic_system_solver.h:439
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:724
fmatvec::Vec sParent
TODO.
Definition: dynamic_system_solver.h:717
int(DynamicSystemSolver::* solveImpacts_)()
function pointer for election of prox-solver for impact equations on velocity level
Definition: dynamic_system_solver.h:304
void plot() override
plots time dependent data
Definition: dynamic_system_solver.cc:1748
bool term
boolean to check for termination of contact equations solution
Definition: dynamic_system_solver.h:804
int solveConstraintsFixpointSingle() override
solve contact equations with single step fixed point scheme
Definition: dynamic_system_solver.cc:492
void computeInitialCondition()
compute initial condition for links for event driven integrator
Definition: dynamic_system_solver.cc:899
fmatvec::Vec hParent[2]
smooth, smooth with respect to objects, smooth with respect to links right hand side
Definition: dynamic_system_solver.h:751
void setProjectionTolerance(double tol)
set tolerance for projection of generalized position
Definition: dynamic_system_solver.h:501
fmatvec::Vec zd
derivative of state vector
Definition: dynamic_system_solver.h:672
bool useOldla
flag if contac force parameter of last time step should be used
Definition: dynamic_system_solver.h:834
fmatvec::Mat WParent[2]
contact force directions
Definition: dynamic_system_solver.h:692
fmatvec::VecInt LinkStatusParent
status vector of set valued links with piecewise link equation (which piece is valid)
Definition: dynamic_system_solver.h:773
fmatvec::Vec bc
TODO.
Definition: dynamic_system_solver.h:799
int solveConstraintsLinearEquations()
solution of contact equations with direct linear solver using minimum of least squares
Definition: dynamic_system_solver.cc:949
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:507
fmatvec::SqrMat Jprox
JACOBIAN of contact equations for Newton scheme.
Definition: dynamic_system_solver.h:789
void initialize()
Initialize the system.
Definition: dynamic_system_solver.cc:104
void updateWRef(fmatvec::Mat &ref, int i=0) override
references to contact force direction matrix of dynamic system parent
Definition: dynamic_system_solver.h:602
fmatvec::Mat VParent[2]
condensed contact force directions
Definition: dynamic_system_solver.h:697
double lmParm
Levenberg-Marquard parameter.
Definition: dynamic_system_solver.h:814
fmatvec::Vec gParent
relative distances
Definition: dynamic_system_solver.h:729
virtual void updatelaInverseKinetics()
update inverse kinetics constraint forces
Definition: dynamic_system_solver.cc:1668
fmatvec::Vec z
state vector
Definition: dynamic_system_solver.h:667
bool peds
TODO, flag for occuring impact and sticking in event driven solver.
Definition: dynamic_system_solver.h:864
static void sigInterruptHandler(int)
handler for user interrupt signal
Definition: dynamic_system_solver.cc:1359
void writeStateTable(std::string fileName)
writes state table to a file
Definition: dynamic_system_solver.cc:1385
bool numJac
flag if Jacobian for Newton scheme should be calculated numerically
Definition: dynamic_system_solver.h:839
void saveLa()
save contact impulses for use as starting value in next time step
Definition: dynamic_system_solver.cc:1256
fmatvec::Vec wbParent
TODO.
Definition: dynamic_system_solver.h:702
double t
time
Definition: dynamic_system_solver.h:652
Solver smoothSolver
solver for contact equations and impact equations
Definition: dynamic_system_solver.h:819
int solveConstraintsRootFinding() override
solve contact equations with Newton scheme
Definition: dynamic_system_solver.cc:592
double tolProj
Tolerance for projection of generalized position.
Definition: dynamic_system_solver.h:869
fmatvec::Vec resParent
residuum of contact equations
Definition: dynamic_system_solver.h:722
int(DynamicSystemSolver::* solveConstraints_)()
Definition: dynamic_system_solver.h:297
bool dropContactInfo
flag if contact matrices for debugging should be dropped in no-convergence case
Definition: dynamic_system_solver.h:829
fmatvec::VecInt decreaseLevels
decreasing relaxation factors is done in levels containing the number of contact iterations as condit...
Definition: dynamic_system_solver.h:844
fmatvec::VecInt checkTermLevels
TODO.
Definition: dynamic_system_solver.h:849
bool READZ0
is a state read from a file
Definition: dynamic_system_solver.h:937
int solveConstraintsGaussSeidel() override
solve contact equations with Gauss-Seidel scheme
Definition: dynamic_system_solver.cc:552
fmatvec::SqrMat G
mass action matrix
Definition: dynamic_system_solver.h:794
std::string getSolverInfo()
Definition: dynamic_system_solver.cc:1305
int solveConstraintsNonlinearEquations()
solution of contact equations with direct nonlinear newton solver using minimum of least squares in e...
Definition: dynamic_system_solver.cc:968
fmatvec::VecInt LinkStatusRegParent
status vector of single valued links
Definition: dynamic_system_solver.h:779
void updategRef(fmatvec::Vec &ref) override
references to relative distances of dynamic system parent
Definition: dynamic_system_solver.h:583
void updatezRef(fmatvec::Vec &ext)
references to external state
Definition: dynamic_system_solver.cc:1404
void setStopIfNoConvergence(bool flag, bool dropInfo=false)
Definition: dynamic_system_solver.h:428
int solveImpactsLinearEquations()
solution of contact equations with Cholesky decomposition on velocity level
Definition: dynamic_system_solver.cc:978
void writez(std::string fileName, bool formatH5=true)
writes state to a file
Definition: dynamic_system_solver.cc:1363
void addToGraph(Graph *graph, fmatvec::SqrMat &A, int i, std::vector< Element * > &objList)
adds list of objects to tree
Definition: dynamic_system_solver.cc:1551
int solveImpactsRootFinding() override
solve impact equations with Newton scheme on velocity level
Definition: dynamic_system_solver.cc:659
static std::atomic< bool > exitRequest
boolean signal evaluation for end integration set by user
Definition: dynamic_system_solver.h:930
~DynamicSystemSolver() override
destructor
Definition: dynamic_system_solver.cc:96
double tolLocalSolver
Tolerance for local none-linear solvers (solvers on element level)
Definition: dynamic_system_solver.h:874
void updatezdRef(fmatvec::Vec &ext)
references to differentiated external state
Definition: dynamic_system_solver.cc:1416
void addElement(Element *element_)
Definition: dynamic_system_solver.cc:1266
void checkImpactsForTermination() override
validate force laws concerning given tolerances on velocity level
Definition: dynamic_system_solver.cc:735
bool positionDriftCompensationNeeded(double gmax)
check if drift compensation on position level is needed
Definition: dynamic_system_solver.cc:1110
fmatvec::Vec gdParent
relative velocities
Definition: dynamic_system_solver.h:734
DynamicSystemSolver(const std::string &name="")
constructor
Definition: dynamic_system_solver.cc:85
MBSimEnvironment * getMBSimEnvironment()
Definition: dynamic_system_solver.cc:1791
Env * getEnvironment()
Definition: dynamic_system_solver.h:971
fmatvec::Vec zParent
state
Definition: dynamic_system_solver.h:739
bool stopIfNoConvergence
flag if the contact equations should be stopped if there is no convergence
Definition: dynamic_system_solver.h:824
fmatvec::Vec laParent
contact force parameters
Definition: dynamic_system_solver.h:707
void projectGeneralizedPositions(int mode, bool fullUpdate=false)
drift projection for positions
Definition: dynamic_system_solver.cc:1136
fmatvec::SymMat LLMParent
Cholesky decomposition of mass matrix.
Definition: dynamic_system_solver.h:682
fmatvec::Vec rFactorParent
relaxation parameters for contact equations
Definition: dynamic_system_solver.h:712
void init(InitStage stage, const InitConfigSet &config) override
plots time series header
Definition: dynamic_system_solver.cc:120
Element * getElement(const std::string &name)
Definition: dynamic_system_solver.cc:1278
fmatvec::Vec svParent
stopvector (rootfunctions for event driven integration
Definition: dynamic_system_solver.h:763
void constructor()
set plot feature default values
Definition: dynamic_system_solver.cc:1430
double dt
step size
Definition: dynamic_system_solver.h:657
int zSize
size of state vector
Definition: dynamic_system_solver.h:662
fmatvec::Mat TParent
matrix of linear relation between differentiated positions and velocities
Definition: dynamic_system_solver.h:687
void updategdRef(fmatvec::Vec &ref) override
references to relative velocities of dynamic system parent
Definition: dynamic_system_solver.h:589
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:1564
virtual void updateG()
updates mass action matrix
Definition: dynamic_system_solver.cc:987
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:609
fmatvec::Vec zdParent
differentiated state
Definition: dynamic_system_solver.h:744
void setDynamicSystemSolverTolerance(double tol)
set tolerance for global none-linear solver (solvers on DynamicSystemSolver level),...
Definition: dynamic_system_solver.h:514
void initla()
load contact forces for use as starting value
Definition: dynamic_system_solver.cc:1251
void readz0(std::string fileName)
reads state from a file
Definition: dynamic_system_solver.cc:1396
fmatvec::SparseMat Gs
sparse mass action matrix
Definition: dynamic_system_solver.h:784
void updatewbRef(fmatvec::Vec &ref) override
references to TODO of dynamic system parent
Definition: dynamic_system_solver.h:595
fmatvec::SymMat MParent
mass matrix
Definition: dynamic_system_solver.h:677
void dropContactMatrices()
Definition: dynamic_system_solver.cc:1322
bool velocityDriftCompensationNeeded(double gdmax)
check if drift compensation on velocity level is needed
Definition: dynamic_system_solver.cc:1123
fmatvec::VecInt jsvParent
boolean evaluation of stopvector
Definition: dynamic_system_solver.h:768
int solveImpactsFixpointSingle() override
solve impact equations with single step fixed point scheme on velocity level
Definition: dynamic_system_solver.cc:522
fmatvec::Vec rParent[2]
nonsmooth right hand side
Definition: dynamic_system_solver.h:756
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:879
int maxIter
maximum number of contact iterations, high number of contact iterations for warnings,...
Definition: dynamic_system_solver.h:809
int solveImpactsGaussSeidel() override
solve impact equations with Gauss-Seidel scheme on velocity level
Definition: dynamic_system_solver.cc:572
void projectGeneralizedVelocities(int mode)
drift projection for positions
Definition: dynamic_system_solver.cc:1200
bool checkGSize
boolean if force action matrix should be resized in each step
Definition: dynamic_system_solver.h:854
void initLa()
load contact impulses for use as starting value
Definition: dynamic_system_solver.cc:1261
virtual void updater(int j=0)
update smooth link force law
Definition: dynamic_system_solver.cc:848
void savela()
save contact forces for use as starting value in next time step
Definition: dynamic_system_solver.cc:1246
int limitGSize
TODO.
Definition: dynamic_system_solver.h:859
void decreaserFactors()
decrease relaxation factors if mass action matrix is not diagonal dominant
Definition: dynamic_system_solver.cc:1088
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:63
InitStage
The stages of the initialization.
Definition: element.h:62
std::string name
name of element
Definition: element.h:260
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
namespace MBSim
Definition: bilateral_constraint.cc:30
Definition: dynamic_system_solver.h:38