NeoPZ
Classes | Public Member Functions | Private Attributes | List of all members
TPZCompElLagrange Class Reference

#include <TPZCompElLagrange.h>

Inheritance diagram for TPZCompElLagrange:
[legend]
Collaboration diagram for TPZCompElLagrange:
[legend]

Classes

struct  TLagrange
 

Public Member Functions

 TPZCompElLagrange ()
 
 TPZCompElLagrange (const TPZCompElLagrange &copy)
 
 TPZCompElLagrange (TPZCompMesh &mesh, int64_t connect1, int idf1, int64_t connect2, int idf2, int64_t &index)
 
 TPZCompElLagrange (TPZCompMesh &mesh, const TPZVec< TLagrange > &Dependencies, int64_t &index)
 
 TPZCompElLagrange (TPZCompMesh &mesh, const TPZCompEl &copy)
 Put a copy of the element in the referred mesh. More...
 
 TPZCompElLagrange (TPZCompMesh &mesh, const TPZCompEl &copy, std::map< int64_t, int64_t > &gl2lcElMap)
 Put a copy of the element in the patch mesh. More...
 
 TPZCompElLagrange (TPZCompMesh &mesh, const TPZCompEl &copy, int64_t &index)
 Copy of the element in the new mesh with alocated index. More...
 
virtual ~TPZCompElLagrange ()
 
virtual TPZCompElClone (TPZCompMesh &mesh) const override
 Method for creating a copy of the element. More...
 
virtual TPZCompElClonePatchEl (TPZCompMesh &mesh, std::map< int64_t, int64_t > &gl2lcConMap, std::map< int64_t, int64_t > &gl2lcElMap) const override
 Method for creating a copy of the element in a patch mesh. More...
 
virtual int NConnects () const override
 Returns the number of nodes of the element. More...
 
virtual int64_t ConnectIndex (int i) const override
 Returns the index of the ith connectivity of the element. More...
 
virtual int Dimension () const override
 Dimension of the element. More...
 
void CreateGraphicalElement (TPZGraphMesh &, int) override
 Creates corresponding graphical element(s) if the dimension matches graphical elements are used to generate output files. More...
 
void EvaluateError (std::function< void(const TPZVec< REAL > &loc, TPZVec< STATE > &val, TPZFMatrix< STATE > &deriv)> fp, TPZVec< REAL > &, bool store_error) override
 Performs an error estimate on the elemen. More...
 
virtual void BuildCornerConnectList (std::set< int64_t > &connectindexes) const override
 adds the connect indexes associated with base shape functions to the set More...
 
virtual void SetConnectIndex (int inode, int64_t index) override
 Set the index i to node inode. More...
 
virtual void CalcStiff (TPZElementMatrix &ek, TPZElementMatrix &ef) override
 Computes the element stifness matrix and right hand side. More...
 
void InitializeElementMatrix (TPZElementMatrix &ek, TPZElementMatrix &ef)
 Computes the element right hand side. More...
 
int ClassId () const override
 Define the class id associated with the class. More...
 
- Public Member Functions inherited from TPZCompEl
 TPZCompEl ()
 Simple Constructor. More...
 
virtual ~TPZCompEl ()
 Simple destructor. More...
 
 TPZCompEl (TPZCompMesh &mesh, const TPZCompEl &copy)
 Put a copy of the element in the referred mesh. More...
 
 TPZCompEl (TPZCompMesh &mesh, const TPZCompEl &copy, std::map< int64_t, int64_t > &gl2lcElMap)
 Put a copy of the element in the patch mesh. More...
 
 TPZCompEl (TPZCompMesh &mesh, const TPZCompEl &copy, int64_t &index)
 Copy of the element in the new mesh returning allocated index. More...
 
 TPZCompEl (TPZCompMesh &mesh, TPZGeoEl *gel, int64_t &index)
 Creates a computational element within mesh. Inserts the element within the data structure of the mesh. More...
 
virtual void SetCreateFunctions (TPZCompMesh *mesh)
 Sets create function in TPZCompMesh to create elements of this type. More...
 
virtual REAL VolumeOfEl ()
 Returns the volume of the geometric element associated. More...
 
virtual void LoadElementReference ()
 Loads the geometric element reference. More...
 
virtual REAL CompareElement (int var, char *matname)
 This method computes the norm of the difference of a post processed variable with @ the same post processed variable of the element pointed to by the geometric element. More...
 
virtual void Assemble ()
 Computes the element stifness matrix and right hand side in an internal data structure. Used for initializing condensed element data structures. More...
 
virtual bool HasMaterial (const std::set< int > &materialids) const
 Verifies if the material associated with the element is contained in the set. More...
 
virtual void CalcResidual (TPZElementMatrix &ef)
 Computes the element right hand side. More...
 
virtual void Divide (int64_t index, TPZVec< int64_t > &subindex, int interpolate=0)
 Divide the computational element. If interpolate = 1, the solution is interpolated to the sub elements. More...
 
virtual void ProjectFlux (TPZElementMatrix &ek, TPZElementMatrix &ef)
 Projects the flux function on the finite element space. More...
 
virtual void ComputeError (int errorid, TPZVec< REAL > &error)
 ComputeError computes the element error estimator. More...
 
virtual void Integrate (int variable, TPZVec< STATE > &value)
 Integrates a variable over the element. More...
 
virtual void GetMemoryIndices (TPZVec< int64_t > &indices) const
 Get the indices of the vector of element memory associated with the integration points. More...
 
virtual void SetMemoryIndices (TPZVec< int64_t > &indices)
 Set the indices of the vector of element memory associated with the integration points. More...
 
virtual void PrepareIntPtIndices ()
 Prepare the vector of the material withmem with the correct integration point indexes. More...
 
virtual void ForcePrepareIntPtIndices ()
 PrepareIntPtIndices initializes the material damage varibles memory in the proper material class. More...
 
virtual void SetFreeIntPtIndices ()
 Frees the material damage varibles memory in the proper material class. More...
 
virtual int NumberOfCompElementsInsideThisCompEl ()
 Return the size of the elementvec in multiphysics, if it is not multiphysics, just return 1. More...
 
virtual void TransferMultiphysicsElementSolution ()
 
virtual void SetMultiphysicsElementSolution ()
 
virtual void AddShapeRestraint (TPZOneShapeRestraint restraint)
 Add a shape restraint (meant to fit the pyramid to restraint. More...
 
virtual std::list< TPZOneShapeRestraintGetShapeRestraints () const
 Return a list with the shape restraints. More...
 
virtual void ResetShapeRestraints ()
 Return a list with the shape restraints. More...
 
virtual void Solution (TPZVec< REAL > &qsi, int var, TPZVec< STATE > &sol)
 Calculates the solution - sol - for the variable var at point qsi, where qsi is expressed in terms of the master element coordinates. More...
 
virtual TPZVec< STATE > IntegrateSolution (int var) const
 Compute the integral of a variable. More...
 
virtual TPZVec< STATE > IntegrateSolution (const std::string &varname, const std::set< int > &matids)
 Compute the integral of a variable defined by the string if the material id is included in matids. More...
 
virtual void ComputeSolution (TPZVec< REAL > &qsi, TPZMaterialData &data)
 
virtual void ComputeSolution (TPZVec< REAL > &qsi, TPZSolVec &sol, TPZGradSolVec &dsol, TPZFMatrix< REAL > &axes)
 Computes solution and its derivatives in the local coordinate qsi. More...
 
virtual void ComputeSolution (TPZVec< REAL > &qsi, TPZVec< REAL > &normal, TPZSolVec &leftsol, TPZGradSolVec &dleftsol, TPZFMatrix< REAL > &leftaxes, TPZSolVec &rightsol, TPZGradSolVec &drightsol, TPZFMatrix< REAL > &rightaxes)
 Computes solution and its derivatives in the local coordinate qsi.
This method will function for both volumetric and interface elements. More...
 
virtual void ComputeSolution (TPZVec< REAL > &qsi, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphix, const TPZFMatrix< REAL > &axes, TPZSolVec &sol, TPZGradSolVec &dsol)
 Computes solution and its derivatives in local coordinate qsi. More...
 
virtual void BuildConnectList (std::set< int64_t > &indepconnectlist, std::set< int64_t > &depconnectlist)
 Builds the list of all connectivities related to the element including the connects pointed to by dependent connects. More...
 
virtual void BuildConnectList (TPZStack< int64_t > &connectlist) const
 Builds the list of all connectivities related to the element including the connects pointed to by dependent connects. More...
 
virtual void BuildConnectList (std::set< int64_t > &connectlist)
 Builds the list of all connectivities related to the element including the connects pointed to by dependent connects. More...
 
virtual int HasDependency ()
 Returns 1 if the element has at least one dependent node. Returns 0 otherwise. More...
 
virtual int PressureConnectIndex () const
 Returns the index of the pressure connect. More...
 
virtual void ReduceInternalNodes ()
 Domain Decomposition.
This method will eliminate the nodes which are internal to the element from the datastructure of the grid
After calling this method, the superelement will statically condense the internal equations. More...
 
virtual void CalcBlockDiagonal (TPZStack< int64_t > &connectlist, TPZBlockDiagonal< STATE > &block)
 Calculates the diagonal block. More...
 
REAL MaximumRadiusOfEl ()
 Will return the maximum distance between the nodes of the reference element. More...
 
REAL LesserEdgeOfEl ()
 Will return the smallest distance between two nodes of the reference element. More...
 
void Write (TPZStream &buf, int withclassid) const override
 Save the element data to a stream. More...
 
void Read (TPZStream &buf, void *context) override
 Read the element data from a stream. More...
 
virtual void InitializeIntegrationRule ()
 
virtual int ComputeIntegrationOrder () const
 
virtual void SetIntegrationRule (TPZIntPoints *intrule)
 Method to set a dynamically allocated integration rule. More...
 
virtual void SetIntegrationRule (int order)
 
virtual const TPZIntPointsGetIntegrationRule () const
 
virtual MElementType Type ()
 Return the type of the element. More...
 
virtual int IsInterface ()
 
TPZGeoElReference () const
 Return a pointer to the corresponding geometric element if such exists, return 0 otherwise. More...
 
void SetReference (int64_t referenceindex)
 
virtual bool NeedsComputing (const std::set< int > &materialids)
 return true if the element has a variational statement associated with the material ids More...
 
virtual int NEquations ()
 Returns the number of equations of the element. More...
 
int64_t Index () const
 Returns element index of the mesh fELementVec list. More...
 
void SetIndex (int64_t index)
 Sets element index of the mesh fELementVec list. More...
 
virtual TPZConnectConnect (int i) const
 Returns a pointer to the ith node. More...
 
virtual TPZMaterialMaterial () const
 Identify the material object associated with the element. More...
 
TPZGeoElGetRefElPatch ()
 Returns the reference geometric element patch.
Look for a geometric element which refers to a computational element and is neighbour of the current element AND is larger than the current element. More...
 
virtual void LoadSolution ()
 Loads the solution within the internal data structure of the element. More...
 
void SetMesh (TPZCompMesh *mesh)
 Sets the grid of the element. More...
 
TPZCompMeshMesh () const
 Return a pointer to the grid of the element. More...
 
virtual void Print (std::ostream &out=std::cout) const
 Prints element data. More...
 
virtual void PrintSolution (TPZVec< REAL > &point, const char *VarName, std::ostream &out)
 Prints the solution - sol - for the variable "VarName" at point specified in terms of the master element coordinates. More...
 
virtual void PrintCoordinate (TPZVec< REAL > &point, int CoordinateIndex, std::ostream &out)
 Prints one coordinate index corresponding to the point to the output stream. More...
 
virtual void PrintTitle (const char *VarName, std::ostream &out)
 Prints the variables names associated with the element material. More...
 
- Public Member Functions inherited from TPZSavable
 TPZSavable ()
 
virtual ~TPZSavable ()
 
virtual std::list< std::map< std::string, uint64_t > > VersionHistory () const
 
virtual std::pair< std::string, uint64_t > Version () const
 
virtual bool Compare (TPZSavable *copy, bool override=false)
 Compares the object for identity with the object pointed to, eventually copy the object. More...
 
virtual bool Compare (TPZSavable *copy, bool override=false) const
 Compares the object for identity with the object pointed to, eventually copy the object. More...
 
- Public Member Functions inherited from TPZRegisterClassId
template<typename T >
 TPZRegisterClassId (int(T::*)() const)
 
 TPZRegisterClassId ()=default
 

Private Attributes

TPZManVector< TLagrange, 3 > fDef
 

Additional Inherited Members

- Static Public Member Functions inherited from TPZCompEl
static int StaticClassId ()
 
static void SetgOrder (int order)
 Sets the value of the default interpolation order. More...
 
static int GetgOrder ()
 Set the default value of the interpolation order. More...
 
static void SetOrthogonalFunction (void(*orthogonal)(REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi))
 Sets the orthogonal function which will be used throughout the program by default this function is the Chebyshev function. More...
 
static void Chebyshev (REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 Implements of the orthogonal Chebyshev functions. More...
 
- Static Public Member Functions inherited from TPZSavable
static std::set< TPZRestoreClassBase * > & RestoreClassSet ()
 This static function guarantees that the gMap object is available when needed. More...
 
static std::map< int, TPZRestore_t > & ClassIdMap ()
 This static function guarantees that the gMap object is available when needed. More...
 
static std::pair< std::string, uint64_t > NeoPZVersion ()
 
static void Register (TPZRestoreClassBase *restore)
 
static void RegisterClassId (int classid, TPZRestore_t fun)
 
static TPZSavableCreateInstance (const int &classId)
 
- Protected Attributes inherited from TPZCompEl
TPZCompMeshfMesh
 Computational mesh to which the element belongs. More...
 
int64_t fIndex
 Element index into mesh element vector. More...
 
TPZIntPointsfIntegrationRule
 Integration rule established by the user. More...
 

Detailed Description

Definition at line 17 of file TPZCompElLagrange.h.

Constructor & Destructor Documentation

◆ TPZCompElLagrange() [1/7]

TPZCompElLagrange::TPZCompElLagrange ( )
inline

Definition at line 44 of file TPZCompElLagrange.h.

Referenced by Clone(), and ClonePatchEl().

◆ TPZCompElLagrange() [2/7]

TPZCompElLagrange::TPZCompElLagrange ( const TPZCompElLagrange copy)
inline

Definition at line 49 of file TPZCompElLagrange.h.

References fDef.

◆ TPZCompElLagrange() [3/7]

TPZCompElLagrange::TPZCompElLagrange ( TPZCompMesh mesh,
int64_t  connect1,
int  idf1,
int64_t  connect2,
int  idf2,
int64_t &  index 
)
inline

◆ TPZCompElLagrange() [4/7]

TPZCompElLagrange::TPZCompElLagrange ( TPZCompMesh mesh,
const TPZVec< TLagrange > &  Dependencies,
int64_t &  index 
)
inline

Definition at line 77 of file TPZCompElLagrange.h.

◆ TPZCompElLagrange() [5/7]

TPZCompElLagrange::TPZCompElLagrange ( TPZCompMesh mesh,
const TPZCompEl copy 
)
inline

Put a copy of the element in the referred mesh.

Definition at line 83 of file TPZCompElLagrange.h.

References DebugStop, and fDef.

◆ TPZCompElLagrange() [6/7]

TPZCompElLagrange::TPZCompElLagrange ( TPZCompMesh mesh,
const TPZCompEl copy,
std::map< int64_t, int64_t > &  gl2lcElMap 
)
inline

Put a copy of the element in the patch mesh.

Definition at line 94 of file TPZCompElLagrange.h.

References DebugStop, and fDef.

◆ TPZCompElLagrange() [7/7]

TPZCompElLagrange::TPZCompElLagrange ( TPZCompMesh mesh,
const TPZCompEl copy,
int64_t &  index 
)
inline

Copy of the element in the new mesh with alocated index.

Definition at line 106 of file TPZCompElLagrange.h.

References DebugStop, fDef, and ~TPZCompElLagrange().

◆ ~TPZCompElLagrange()

TPZCompElLagrange::~TPZCompElLagrange ( )
virtual

Definition at line 13 of file TPZCompElLagrange.cpp.

Referenced by TPZCompElLagrange().

Member Function Documentation

◆ BuildCornerConnectList()

virtual void TPZCompElLagrange::BuildCornerConnectList ( std::set< int64_t > &  connectindexes) const
inlineoverridevirtual

adds the connect indexes associated with base shape functions to the set

Implements TPZCompEl.

Definition at line 177 of file TPZCompElLagrange.h.

References TPZCompElLagrange::TLagrange::fConnect, and TPZVec< T >::size().

◆ CalcStiff()

void TPZCompElLagrange::CalcStiff ( TPZElementMatrix ek,
TPZElementMatrix ef 
)
overridevirtual

Computes the element stifness matrix and right hand side.

Parameters
ekelement stiffness matrix
efelement load vector

Reimplemented from TPZCompEl.

Definition at line 55 of file TPZCompElLagrange.cpp.

References TPZCompMesh::Block(), TPZMatrix< TVar >::Cols(), TPZCompEl::Connect(), DebugStop, fDef, TPZElementMatrix::fMat, InitializeElementMatrix(), TPZCompEl::Mesh(), TPZConnect::NShape(), TPZConnect::NState(), and TPZConnect::SequenceNumber().

Referenced by SetConnectIndex().

◆ ClassId()

int TPZCompElLagrange::ClassId ( ) const
overridevirtual

Define the class id associated with the class.

This id has to be unique for all classes A non unique id is flagged at the startup of the program

Reimplemented from TPZCompEl.

Definition at line 132 of file TPZCompElLagrange.cpp.

References TPZCompEl::ClassId(), and Hash().

Referenced by SetConnectIndex().

◆ Clone()

virtual TPZCompEl* TPZCompElLagrange::Clone ( TPZCompMesh mesh) const
inlineoverridevirtual

Method for creating a copy of the element.

Implements TPZCompEl.

Definition at line 120 of file TPZCompElLagrange.h.

References ClonePatchEl(), and TPZCompElLagrange().

◆ ClonePatchEl()

TPZCompEl * TPZCompElLagrange::ClonePatchEl ( TPZCompMesh mesh,
std::map< int64_t, int64_t > &  gl2lcConMap,
std::map< int64_t, int64_t > &  gl2lcElMap 
) const
overridevirtual

Method for creating a copy of the element in a patch mesh.

Parameters
meshPatch clone mesh
gl2lcConMapmap the connects indexes from global element (original) to the local copy.
gl2lcElMapmap the computational elements Otherwise of the previous clone function, this method don't copy entire mesh. Therefore it needs to map the connect index from the both meshes - original and patch

Implements TPZCompEl.

Definition at line 29 of file TPZCompElLagrange.cpp.

References DebugStop, fDef, and TPZCompElLagrange().

Referenced by Clone().

◆ ConnectIndex()

virtual int64_t TPZCompElLagrange::ConnectIndex ( int  i) const
inlineoverridevirtual

Returns the index of the ith connectivity of the element.

Parameters
iconnectivity index who want knows

Implements TPZCompEl.

Definition at line 150 of file TPZCompElLagrange.h.

References DebugStop, and TPZVec< T >::size().

Referenced by InitializeElementMatrix().

◆ CreateGraphicalElement()

void TPZCompElLagrange::CreateGraphicalElement ( TPZGraphMesh graphmesh,
int  dimension 
)
inlineoverridevirtual

Creates corresponding graphical element(s) if the dimension matches graphical elements are used to generate output files.

Parameters
graphmeshgraphical mesh where the element will be created
dimensiontarget dimension of the graphical element

Reimplemented from TPZCompEl.

Definition at line 165 of file TPZCompElLagrange.h.

◆ Dimension()

virtual int TPZCompElLagrange::Dimension ( ) const
inlineoverridevirtual

Dimension of the element.

Implements TPZCompEl.

Definition at line 160 of file TPZCompElLagrange.h.

◆ EvaluateError()

void TPZCompElLagrange::EvaluateError ( std::function< void(const TPZVec< REAL > &loc, TPZVec< STATE > &val, TPZFMatrix< STATE > &deriv)>  func,
TPZVec< REAL > &  errors,
bool  store_error 
)
inlineoverridevirtual

Performs an error estimate on the elemen.

Parameters
fpfunction pointer which computes the exact solution
errors[out] the L2 norm of the error of the solution
flux[in] value of the interpolated flux values

Reimplemented from TPZCompEl.

Definition at line 169 of file TPZCompElLagrange.h.

◆ InitializeElementMatrix()

void TPZCompElLagrange::InitializeElementMatrix ( TPZElementMatrix ek,
TPZElementMatrix ef 
)

◆ NConnects()

virtual int TPZCompElLagrange::NConnects ( ) const
inlineoverridevirtual

Returns the number of nodes of the element.

Implements TPZCompEl.

Definition at line 141 of file TPZCompElLagrange.h.

References TPZVec< T >::size().

Referenced by InitializeElementMatrix().

◆ SetConnectIndex()

virtual void TPZCompElLagrange::SetConnectIndex ( int  inode,
int64_t  index 
)
inlineoverridevirtual

Set the index i to node inode.

Parameters
inodenode to set index
indexindex to be seted

Implements TPZCompEl.

Definition at line 190 of file TPZCompElLagrange.h.

References CalcStiff(), ClassId(), DebugStop, InitializeElementMatrix(), and TPZVec< T >::size().

Member Data Documentation

◆ fDef

TPZManVector<TLagrange,3> TPZCompElLagrange::fDef
private

Definition at line 40 of file TPZCompElLagrange.h.

Referenced by CalcStiff(), ClonePatchEl(), and TPZCompElLagrange().


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