chrono::ChSystemDescriptorMulticore Class Reference

Description

System descriptor for Chrono::Multicore.

#include <ChSystemDescriptorMulticore.h>

Inheritance diagram for chrono::ChSystemDescriptorMulticore:
Collaboration diagram for chrono::ChSystemDescriptorMulticore:

Public Member Functions

 ChSystemDescriptorMulticore (ChMulticoreDataManager *dc)
 
- Public Member Functions inherited from chrono::ChSystemDescriptor
 ChSystemDescriptor ()
 Constructor.
 
virtual ~ChSystemDescriptor ()
 Destructor.
 
std::vector< ChConstraint * > & GetConstraintsList ()
 Access the vector of constraints.
 
std::vector< ChVariables * > & GetVariablesList ()
 Access the vector of variables.
 
std::vector< ChKblock * > & GetKblocksList ()
 Access the vector of stiffness matrix blocks.
 
virtual void BeginInsertion ()
 Begin insertion of items.
 
virtual void InsertConstraint (ChConstraint *mc)
 Insert reference to a ChConstraint object.
 
virtual void InsertVariables (ChVariables *mv)
 Insert reference to a ChVariables object.
 
virtual void InsertKblock (ChKblock *mk)
 Insert reference to a ChKblock object (a piece of matrix)
 
virtual void EndInsertion ()
 End insertion of items. More...
 
virtual int CountActiveVariables ()
 Count & returns the scalar variables in the system (excluding ChVariable objects that have IsActive() as false). More...
 
virtual int CountActiveConstraints ()
 Count & returns the scalar constraints in the system (excluding ChConstraint objects that have IsActive() as false). More...
 
virtual void UpdateCountsAndOffsets ()
 Updates counts of scalar variables and scalar constraints, if you added/removed some item or if you switched some active state, otherwise CountActiveVariables() and CountActiveConstraints() might fail.
 
virtual void SetMassFactor (const double mc_a)
 Sets the c_a coefficient (default=1) used for scaling the M masses of the vvariables when performing ShurComplementProduct(), SystemProduct(), ConvertToMatrixForm(),.
 
virtual double GetMassFactor ()
 Gets the c_a coefficient (default=1) used for scaling the M masses of the vvariables when performing ShurComplementProduct(), SystemProduct(), ConvertToMatrixForm(),.
 
virtual int BuildFbVector (ChVectorDynamic<> &Fvector)
 Get a vector with all the 'fb' known terms ('forces'etc.) associated to all variables, ordered into a column vector. More...
 
virtual int BuildBiVector (ChVectorDynamic<> &Bvector)
 Get a vector with all the 'bi' known terms ('constraint residuals' etc.) associated to all constraints, ordered into a column vector. More...
 
virtual int BuildDiVector (ChVectorDynamic<> &Dvector)
 Get the d vector = {f; -b} with all the 'fb' and 'bi' known terms, as in Z*y-d (it is the concatenation of BuildFbVector and BuildBiVector) The column vector must be passed as a ChMatrix<> object, which will be automatically reset and resized to the proper length if necessary. More...
 
virtual int BuildDiagonalVector (ChVectorDynamic<> &Diagonal_vect)
 Get the D diagonal of the Z system matrix, as a single column vector (it includes all the diagonal masses of M, and all the diagonal E (-cfm) terms). More...
 
virtual int FromVariablesToVector (ChVectorDynamic<> &mvector, bool resize_vector=true)
 Using this function, one may get a vector with all the variables 'q' ordered into a column vector. More...
 
virtual int FromVectorToVariables (const ChVectorDynamic<> &mvector)
 Using this function, one may go in the opposite direction of the FromVariablesToVector() function, i.e. More...
 
virtual int FromConstraintsToVector (ChVectorDynamic<> &mvector, bool resize_vector=true)
 Using this function, one may get a vector with all the constraint reactions 'l_i' ordered into a column vector. More...
 
virtual int FromVectorToConstraints (const ChVectorDynamic<> &mvector)
 Using this function, one may go in the opposite direction of the FromConstraintsToVector() function, i.e. More...
 
virtual int FromUnknownsToVector (ChVectorDynamic<> &mvector, bool resize_vector=true)
 Using this function, one may get a vector with all the unknowns x={q,l} i.e. More...
 
virtual int FromVectorToUnknowns (const ChVectorDynamic<> &mvector)
 Using this function, one may go in the opposite direction of the FromUnknownsToVector() function, i.e. More...
 
virtual void ShurComplementProduct (ChVectorDynamic<> &result, const ChVectorDynamic<> &lvector, std::vector< bool > *enabled=nullptr)
 Performs the product of N, the Shur complement of the KKT matrix, by an 'l' vector. More...
 
virtual void SystemProduct (ChVectorDynamic<> &result, const ChVectorDynamic<> &x)
 Performs the product of the entire system matrix (KKT matrix), by a vector x ={q,l}. More...
 
virtual void ConstraintsProject (ChVectorDynamic<> &multipliers)
 Performs projection of constraint multipliers onto allowed set (in case of bilateral constraints it does not affect multipliers, but for frictional constraints, for example, it projects multipliers onto the friction cones) Note! the 'l_i' data in the ChConstraints of the system descriptor are changed by this operation (they get the value of 'multipliers' after the projection), so it may happen that you need to backup them via FromConstraintToVector(). More...
 
virtual void UnknownsProject (ChVectorDynamic<> &mx)
 As ConstraintsProject(), but instead of passing the l vector, the entire vector of unknowns x={q,-l} is passed. More...
 
virtual void ComputeFeasabilityViolation (double &resulting_maxviolation, double &resulting_feasability)
 The following (obsolete) function may be called after a solver's 'Solve()' operation has been performed. More...
 
virtual void ConvertToMatrixForm (ChSparseMatrix *Cq, ChSparseMatrix *H, ChSparseMatrix *E, ChVectorDynamic<> *Fvector, ChVectorDynamic<> *Bvector, ChVectorDynamic<> *Frict, bool only_bilaterals=false, bool skip_contacts_uv=false)
 The following function may be used to create the Jacobian and the mass matrix of the variational problem in matrix form, by assembling all the jacobians of all the constraints/contacts, all the mass matrices, all vectors, as they are currently stored in the sparse data of all ChConstraint and ChVariables contained in this ChSystemDescriptor. More...
 
virtual void ConvertToMatrixForm (ChSparseMatrix *Z, ChVectorDynamic<> *rhs)
 Create and return the assembled system matrix and RHS vector. More...
 
virtual void DumpLastMatrices (bool assembled=false, const char *path="")
 Saves to disk the LAST used matrices of the problem. More...
 
virtual void ArchiveOUT (ChArchiveOut &marchive)
 Method to allow serialization of transient data to archives.
 
virtual void ArchiveIN (ChArchiveIn &marchive)
 Method to allow de-serialization of transient data from archives.
 

Additional Inherited Members

- Protected Attributes inherited from chrono::ChSystemDescriptor
std::vector< ChConstraint * > vconstraints
 list of pointers to all the ChConstraint in the current Chrono system
 
std::vector< ChVariables * > vvariables
 list of pointers to all the ChVariables in the current Chrono system
 
std::vector< ChKblock * > vstiffness
 list of pointers to all the ChKblock in the current Chrono system
 
double c_a
 

The documentation for this class was generated from the following file:
  • /builds/uwsbel/chrono/src/chrono_multicore/solver/ChSystemDescriptorMulticore.h