chrono::ChKblock Class Referenceabstract

Description

Base class for representing items which introduce block-sparse matrices, that is blocks that connect some 'variables' and build a matrix K in a sparse variational inequality VI(Z*x-d,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>

Inheritance diagram for chrono::ChKblock:

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()

virtual void chrono::ChKblock::Build_K ( ChSparseMatrix storage,
bool  add = true 
)
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()

virtual void chrono::ChKblock::DiagonalAdd ( ChVectorRef  result)
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()

virtual void chrono::ChKblock::MultiplyAndAdd ( ChVectorRef  result,
ChVectorConstRef  vect 
) const
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