Finite Element Tools

DofNumbering

class DofNumbering

Public Functions

DofNumbering()
CMuscatIndex GetSize() const
bool GetFromConnectivity() const
void SetFromConnectivity(const bool &val)
void ComputeNumberingFromConnectivity(Mesh &mesh)
void ComputeNumberingGeneral(Mesh &mesh, const Space &space, ElementFilterBase &elementFilter)
bool HasNumberingFor(const std::string &elemtype) const
void InitNumberingFor(const std::string &elemtype, const CMuscatIndex &nbOfElement, const CMuscatIndex &nbOfShapeFuntions)
MatrixIDD &GetNumberingFor(const std::string &elemtype)
CMuscatIndex GetDofOfkey(const DofKey &key)
CMuscatIndex GetDofOfPoint(const CMuscatIndex &pid)
CMuscatIndex GetSizeOfDofToPoint()
MatrixID1 &GetdoftopointLeft()
MatrixID1 &GetdoftopointRight()
void computeDofToPoint()
void computeDofToCell(Mesh &mesh)
CMuscatIndex GetSizeOfDofToCell()
MatrixID1 &GetdoftocellLeft()
MatrixID1 &GetdoftocellRight()
template<typename S>
inline DofKey GetKeyFor(const std::string &elemtype, const CMuscatIndex &elid, const int &sf, const ElementsContainer &data, const DofAttachment &da, const S &elcoon) const
std::string ToStr() const

Integration Rules

class IntegrationRule

Public Functions

inline CMuscatIndex GetNumberOfPoints() const

Public Members

MatrixDDD p
MatrixDDD w
class SpaceIntegrationRule

Public Functions

inline const IntegrationRule &GetIR(const std::string &key) const

Public Members

std::map<std::string, IntegrationRule> storage
std::map<std::string, SpaceIntegrationRule> Muscat::IntegrationRulesAlmanac

Warning

doxygenfunction: Cannot find function “Muscat::GetPythonDefinedIntegrationRules” in doxygen xml output for project “MuscatCpp” from directory: ./xml/

Finite Element Spaces

Warning

doxygenfunction: Cannot find function “Muscat::GetFESpaceFor” in doxygen xml output for project “MuscatCpp” from directory: ./xml/

Warning

doxygenfunction: Cannot find function “Muscat::GetAvailableSpaces” in doxygen xml output for project “MuscatCpp” from directory: ./xml/

Integration

struct LocalSpace

Public Functions

DEFINE_SETGET_VECTOR_SHARED_MAP_MatrixDD1(ShapeVal, valN)
DEFINE_SETGET_VECTOR_SHARED_MAP_MatrixDDD(ShapeDerVal, valdphidxi)
inline void Init(const int &dim, const int &NumberOfShapeFunctions, const int &numberOfIntegrationPoints)
inline void resize(const int s)
inline LocalSpace()
inline MapMatrixDD1 &GetNxNyNz()
inline MatrixDDD &GetBxByBz()
template<typename T>
inline void SetActiveIntegrationPoint(const int &ip, T &Jinv)

Public Members

int dimensionality
int numberOfShapeFunctions
int numberOfIntegrationPoints
int activeIntegrationPoint
std::vector<std::shared_ptr<MapMatrixDD1>> valN
std::vector<std::shared_ptr<MapMatrixDDD>> valdphidxi
MatrixDDD BxByBz
struct MonoElementsIntegralCpp

Public Functions

DEFINE_SETGET_SHARED_MAP_MatrixDDD(Nodes, nodes)
DEFINE_SETGET_SHARED_MAP_MatrixIDD(Connectivity, connectivity)
DEFINE_SETGET_VECTOR_SHARED_MAP_MatrixIDD(LocalNumberings, lnumbering)
DEFINE_SETGET_VECTOR_SHARED_MAP_MatrixDD1(FEValues, values)
DEFINE_SETGET_VECTOR_SHARED_MAP_MatrixDDD(IPValues, ipvalues)
inline void SetLocalOffsets(const int &maxSizeUDof, const std::vector<int> &ludof, const std::vector<int> &luNumberingindex, const int &maxSizeTDof, const std::vector<int> &ltdof, const std::vector<int> &ltNumberingindex)
inline void Reset()
inline void SetGeoSpace(const int &i)
inline void SetNumberOfSpaces(const int &i)
inline void InitSpaceS(const int s, const int dim, const int NumberOfShapeFunctions, const int numberOfIntegrationPoints)
template<typename T>
inline void SetSpaceShapeVal(const int spaceNumber, const int integrationPoint, T &pd)
template<typename T>
inline void SetSpaceShapeDerVal(const int spaceNumber, const int integrationPoint, T &pd)
inline void SetNumberOfNumberings(int i)
void SetNumberOfValues(int i)
void SetNumberOfIPValues(int i)
void SetNumberOfUnknownFields(const int &n)
void SetUnknownOffset(const int &n, const int &s)
void SetTotalUnknownDofs(const int &n)
void SetNumberOfTestFields(const int &n)
void SetTotalTestDofs(const int &n)
void SetTestOffset(const int &n, const int &s)
void SetNumberOfConstants(const CMuscatIndex &n)
void SetConstants(const int &n, const CMuscatFloat &val)
void AllocateWorkingElementVIJ(int size)
void SetComputeNormal(const bool &val)
void SetNumberOfIntegrationPoints(const int &n)
void SetIntegrationPointI(const int &n, const CMuscatFloat &w, const CMuscatFloat &p0, const CMuscatFloat &p1, const CMuscatFloat &p2)
void ProcessWeakForm(WeakForm *wform)
void Integrate(WeakForm *wform, const CMuscatIndex &size, const CMuscatIndex *pidstotreat)
template<unsigned int SpaceDim, unsigned int ElementDim>
void IntegrateSpaceDimElementDim(WeakForm *wform, const CMuscatIndex &idstotreat_s, const CMuscatIndex *pidstotreat)

Public Members

int totalUnknownDofs = {0}
MatrixID1 unknownDofsOffset
MatrixID1 unknownDofsNumbering
MatrixID1 localUnknownDofsOffset
int maxsizelocalUnknownDofs
int totalTestDofs = {0}
MatrixID1 testDofsOffset
MatrixID1 testDofsNumbering
MatrixID1 localTestDofsOffset
int maxsizelocalTestDofs
MatrixDD1 constants
MatrixDD1 iw
MatrixDD3 ip
int totalvijcpt = {0}
CMuscatFloat *vK
CMuscatIndex *iK
CMuscatIndex *jK
CMuscatFloat *F
bool hasnormal = {false}
bool onlyEvaluation
bool onlyUpper = {false}
std::shared_ptr<MapMatrixDDD> nodes
std::shared_ptr<MapMatrixIDD> connectivity
int geoSpaceNumber
std::vector<LocalSpace> lspaces
std::vector<std::shared_ptr<MapMatrixIDD>> lnumbering
std::vector<std::shared_ptr<MapMatrixDD1>> values
std::vector<std::shared_ptr<MapMatrixDDD>> ipvalues

Weak form classes

struct WeakTerm

Public Functions

inline WeakTerm()

Public Members

std::string fieldName

Name (used only to communicate with the user)

std::string derCoordName

name of the derivative coordinate (only used for print)

int derDegree

this can be 0 or 1 (1 for first derivative) (if internalType is normal then derDegree determine the normal component to use Normal[0] for example)

bool constant

True if this weakterm is a constant

bool normal

True if this is a normal field (in this case derDegree contains the normal component)

int spaceIndex_

the space used by this variable

int derCoordIndex_

derivative coordinate if derDegree is 1 (not used here)

int numberingIndex_

which numbering this variable uses

int valuesIndex_

<-&#8212; for EnumTestField and EnumUnknownField this is the index to the offsets ^-&#8212; for EnumConstant the index to the constants vector ^&#8212; for EnumExtraField the index to values ^&#8212; for EnumExtraIPField the index to the ipvalues */

int modeIndex_

this is a reserve variable for model reduction integrators

int internalType

the type of variable

Friends

friend std::ostream &operator<<(std::ostream &stream, const WeakTerm &term)

Stream WeakTerm

struct WeakMonom

Public Functions

inline WeakMonom()

Public Members

double prefactor

constant prefactor of the monomial

std::vector<WeakTerm> prod

factors storage of this monomial

Friends

friend std::ostream &operator<<(std::ostream &stream, const WeakMonom &monom)

Stream WeakMonom

struct WeakForm

Public Functions

inline CMuscatIndex GetNumberOfTerms() const

Function to get the number of terms present in this polynomial

Public Members

std::vector<WeakMonom> form

monomial storage of this polynomial

Friends

friend std::ostream &operator<<(std::ostream &stream, const WeakForm &WeakForm)

Stream WeakForm

Spaces

struct ElementSpace

Public Functions

inline ElementSpace()
inline int GetDimensionality() const
CMuscatIndex GetNumberOfShapeFunctions() const
const DofAttachment &GetDofAttachment(const int &dofNumber) const
void AppendDofAttachment(const char &entity, const int &entityNumber, const int &extraKey)
const MatrixDD1 GetValOfShapeFunctionsAt(const double phi, const double xi, const double eta) const
const MatrixDD1 GetValOfShapeFunctionsAt(const MatrixDDD &phiXiEta) const
const MatrixDDD GetValOfShapeFunctionsDerAt(const double phi, const double xi, const double eta) const
const MatrixDDD GetValOfShapeFunctionsDerAt(const MatrixDDD &phiXiEta) const
const MatrixDDD GetValOfShapeFunctionsDerDerAt(const CMuscatIndex i, const MatrixDDD &phiXiEta) const
const MatrixDDD GetValOfShapeFunctionsDerDerAt(const CMuscatIndex i, const double phi, const double xi, const double eta) const

Public Members

std::string elementType
GeoSupport geoSupport
std::vector<DofAttachment> storage
MatrixDDD posN
int dimensionality
MatrixDD1 (*SFV)(const double, const double, const double)
MatrixDDD (*SFDV)(const double, const double, const double)
MatrixDDD (*SFDDV)(const CMuscatIndex i, const double, const double, const double)
class Space

Public Functions

CMuscatIndex GetNumberOfShapeFunctionsFor(const std::string &elementType) const
void AddDofTo(const std::string &elementType, const char &entity, const int &entityNumber, const int &extraKey)
const ElementSpace &GetSpaceFor(const std::string &elementType) const
void Print()
std::string ToStr()

Public Members

std::string name
std::map<std::string, ElementSpace> storage
class SpaceAtIP

Public Members

std::vector<MatrixDDD> SFV
std::vector<MatrixDDD> SFDV
std::map<std::string, SpaceAtIP> Muscat::EvaluateSpaceAt(const Space &sp, const SpaceIntegrationRule &sir)
SpaceAtIP Muscat::EvaluateSpaceAt(const ElementSpace &es, const IntegrationRule &ir)