FemProcess
The GeMA Fem Process Plugin
Public Member Functions | List of all members
GmpFemAssemblerMatrixCombiner Class Referenceabstract

Basic interface for defining the rules used to combine information from multiple matrices into a single equivalent matrix. More...

#include <gmpFemAssemblerCombiner.h>

Public Member Functions

virtual double localMatricesToGlobalMatrixContribution (const double *localMatrixData) const =0
 Virtual method to provide the equivalent contribution resulting from combining several local matrix entries into the values that should be assembled in the equivalent global matrix. For each element, will be called for each local matrix (row, col) position receiving as parameters the local value of each configured local matrix, returning the equivalent merged value that will be added to the global matrix. More...
 
virtual int localMatricesToGlobalVectorContributionType () const
 Virtual function returning the type of the global vector that will receive contributions returned by localMatricesToGlobalVectorContribution(). If this function returns -1, the localMatricesToGlobalVectorContribution() function will not be called by the assembler. Otherwise, the retuned value must be a valid GmpFemVectorTypes type. More...
 
virtual int localMatricesToGlobalVectorContributionType2 () const
 Simmilar to localMatricesToGlobalVectorContributionType(), provides the type for a second vector that can be filled by the combiner.
 
virtual double localMatricesToGlobalVectorContribution (const double *localMatrixData, int dofIndex, double fixedDof, double oldFixedDof) const
 Virtual method to provide the contribution of local matrix entries to the global vector specified by localMatricesToGlobalVectorContributionType(). More...
 
virtual double localMatricesToGlobalVectorContribution2 (const double *localMatrixData, int dofIndex, double fixedDof, double oldFixedDof) const
 Simmilar to localMatricesToGlobalVectorContribution(), returning values for the vector specified by localMatricesToGlobalVectorContributionType2()
 

Detailed Description

Basic interface for defining the rules used to combine information from multiple matrices into a single equivalent matrix.

Member Function Documentation

◆ localMatricesToGlobalMatrixContribution()

virtual double GmpFemAssemblerMatrixCombiner::localMatricesToGlobalMatrixContribution ( const double *  localMatrixData) const
pure virtual

Virtual method to provide the equivalent contribution resulting from combining several local matrix entries into the values that should be assembled in the equivalent global matrix. For each element, will be called for each local matrix (row, col) position receiving as parameters the local value of each configured local matrix, returning the equivalent merged value that will be added to the global matrix.

The localMatrixData vector stores the local matrix values for the current matrix position.

It should be indexed by matrix type (like localMatrixData[GmpFemMatrix_K]).

The function should return the equivalent value.

IMPORTANT: when indexing localMatrixData, make sure that you are indexing it with a valid type for the registered matrix set. If the type was NOT filled by the physics, its value will be equal to 0.0.

◆ localMatricesToGlobalVectorContribution()

virtual double GmpFemAssemblerMatrixCombiner::localMatricesToGlobalVectorContribution ( const double *  localMatrixData,
int  dofIndex,
double  fixedDof,
double  oldFixedDof 
) const
inlinevirtual

Virtual method to provide the contribution of local matrix entries to the global vector specified by localMatricesToGlobalVectorContributionType().

Like in localMatricesToGlobalMatrixContribution(), the localMatrixData vector stores the local matrix values for the current matrix position. It should be indexed by matrix type (like localMatrixData[GmpFemMatrix_K]). The dofIndex parameter stores the current global entry column or a negative value for fixed dofs, whose current and old value from the past time step are then given by fixedDof and oldFixedDof. Can be used to provide the matrix contribution for situations simmilar to feq = C * x + dt * f where the C * x term for the given dof implies multiplying the C matrix value from localMatrixData by the value in the x vector (known by the solver) at the position 'dofIndex' or by the fixed dof value if dof is negative.

The returned result will be added to the vector defined by localMatricesToGlobalVectorContributionType(). This function will be called once for each local matrix (row, col) position.

IMPORTANT: when indexing localMatrixData, make sure that you are indexing it with a valid type for the registered matrix set. If the type was NOT filled by the physics, its value will be equal to 0.0.

◆ localMatricesToGlobalVectorContributionType()

virtual int GmpFemAssemblerMatrixCombiner::localMatricesToGlobalVectorContributionType ( ) const
inlinevirtual

Virtual function returning the type of the global vector that will receive contributions returned by localMatricesToGlobalVectorContribution(). If this function returns -1, the localMatricesToGlobalVectorContribution() function will not be called by the assembler. Otherwise, the retuned value must be a valid GmpFemVectorTypes type.

The default implementation returns -1.


The documentation for this class was generated from the following file: