Common Interfaces
These interfaces apply to both single and combined spaces materials.
Error
Interface for computing the error of the FEM solution based on an exact solution.
-
template<class TVar>
class TPZMatError Defines the common error interface used in TPZMatErrorSingleSpace and TPZMatErrorCombinedSpaces.
Subclassed by TPZMatErrorCombinedSpaces< TVar >, TPZMatErrorSingleSpace< TVar >
Error
-
void SetExactSol(ExactSolType<TVar> f, int pOrder)
Sets a exact solution to the material.
This method is used for setting functions used in the weak formulation.
- Parameters
f – Forcing function
pOrder – Suggested integration rule order.
-
inline bool HasExactSol() const
Whether a exact solution has been set.
-
inline int PolynomialOrderExact() const
Gets polynomial order of exact solution.
-
inline virtual int NEvalErrors() const
Returns the number of error norms.
Default is 3: norm, L2 and seminorm.
-
void SetExactSol(ExactSolType<TVar> f, int pOrder)
Note
Materials should use TPZMatErrorSingleSpace or TPZMatErrorCombinedSpaces.
Load cases
Interface for solving an equation system for multiple right-hand side vectors at once
-
class TPZMatLoadCasesBase : public virtual TPZSavable
Defines a type-agnostic interface for materials with multiple load cases. This class is only useful for dynamic casting.
Note
The template parameter of TPZMatLoadCases is relevant on TPZMatLoadCasesBC
Subclassed by TPZMatLoadCases< TVar >
LoadCases
-
inline int NumLoadCases() const
Returns the number of load cases (rhs columns).
-
inline virtual int MinimumNumberofLoadCases() const
Returns the minimum number of load cases (rhs columns).
-
void SetNumLoadCases(int numloadcases)
Sets the number of load cases (rhs columns).
-
void SetPostProcessIndex(int index)
Indicates which variable should be post processed.
The method Solution in the material should then pick the corresponding solution accordingly.
-
inline int NumLoadCases() const
-
template<class TVar>
class TPZMatLoadCases : public TPZMatLoadCasesBase Subclassed by TPZMatLoadCasesBC< TVar >
Memory
Interface for implementing a memory on the integration points
-
template<class TMem>
class TPZMatWithMem : public TPZMatWithMemBase Defines an interface for materials with memory in the integration points.
Subclassed by TPZMatWithMemBC< TMem >
Memory
-
virtual void PrintMem(std::ostream &out = std::cout, const int memory = 0) const override
Prints out the data associated with the material.
-
virtual void Print(std::ostream &out) const override
Prints out the data associated with the material.
-
virtual int PushMemItem(int sourceIndex = -1) override
Pushes a new entry in the context of materials with memory.
- Returns
Returning its index at the internal storage stack
-
virtual void FreeMemItem(int index) override
Frees an entry in the material with memory internal history storage.
-
inline virtual void ResetMemItem(int index) override
Reset the memory index to its default value.
-
inline virtual void ResetMemory() override
Reset all memory items.
-
virtual void SetUpdateMem(bool update = 1) override
Sets/Unsets the internal memory data to be updated in the next assemble/contribute call.
-
virtual bool GetUpdateMem() override
Gets the internal memory data to be updated in the next assemble/contribute call.
-
virtual void PrintMem(std::ostream &out = std::cout, const int memory = 0) const override
Generalised Eigenvalue Problem
-
class TPZMatGeneralisedEigenVal : public virtual TPZSavable
Defines an interface for solving Generalised Eigenvalue problems.
This interface simply adds a method to switch between the left (A) and the right (B) matrices. It is suggested that the materials using this interface use a function pointer for switching between the correct contribute method. See TPZWaveguideModalAnalysis for an example of usage.
Subclassed by TPZMatGeneralisedEigenValBC