Description
Base class for representing items which introduce blocksparse matrices, that is blocks that connect some 'variables' and build a matrix K in a sparse variational inequality VI(Z*xd,K):
See ChSystemDescriptor for more information about the overall problem and data representation.
Note that K blocks often have a physical interpretation as stiffness, but not always, for example they can represent hessians. Note that all blocks in K, all masses and constraint jacobians Cq are not really assembled in large matrices, so to exploit sparsity.
#include <ChKblock.h>
Public Member Functions  
virtual size_t  GetNvars () const =0 
Returns the number of referenced ChVariables items.  
virtual ChMatrixRef  Get_K ()=0 
Access the K stiffness matrix as a single block, referring only to the referenced ChVariable objects.  
virtual void  MultiplyAndAdd (ChVectorRef result, ChVectorConstRef vect) const =0 
Computes the product of the corresponding blocks in the system matrix (ie. More...  
virtual void  DiagonalAdd (ChVectorRef result)=0 
Add the diagonal of the stiffness matrix block(s) as a column vector to 'result'. More...  
virtual void  Build_K (ChSparseMatrix &storage, bool add=true)=0 
Writes (and adds) the K matrix associated to these variables into a global 'storage' matrix, at the offsets of variables. More...  
Member Function Documentation
◆ Build_K()

pure virtual 
Writes (and adds) the K matrix associated to these variables into a global 'storage' matrix, at the offsets of variables.
Most solvers do not need this: the sparse 'storage' matrix is used for testing, for direct solvers, for dumping full matrix to Matlab for checks, etc.
Implemented in chrono::ChKblockGeneric.
◆ DiagonalAdd()

pure virtual 
Add the diagonal of the stiffness matrix block(s) as a column vector to 'result'.
NOTE: 'result' must already have the size of the total variables & constraints in the system.
Implemented in chrono::ChKblockGeneric.
◆ MultiplyAndAdd()

pure virtual 
Computes the product of the corresponding blocks in the system matrix (ie.
the K matrix blocks) by 'vect', and add to 'result'. NOTE: 'vect' and 'result' must already have the size of the total variables & constraints in the system.
Implemented in chrono::ChKblockGeneric.
The documentation for this class was generated from the following file:
 /builds/uwsbel/chrono/src/chrono/solver/ChKblock.h