NeoPZ
Public Member Functions | List of all members
TPZCompElPostProc< TCOMPEL > Class Template Reference

This class implements the TPZCompEl structure to enable copying the solution of the referred compEl at the integration points to itself and interpolating it inside the element. More...

#include <pzcompelpostproc.h>

Inheritance diagram for TPZCompElPostProc< TCOMPEL >:
[legend]
Collaboration diagram for TPZCompElPostProc< TCOMPEL >:
[legend]

Public Member Functions

 TPZCompElPostProc ()
 
virtual ~TPZCompElPostProc ()
 
 TPZCompElPostProc (TPZCompMesh &mesh, TPZGeoEl *gel, int64_t &index)
 
 TPZCompElPostProc (TPZCompMesh &mesh, const TPZCompElPostProc< TCOMPEL > &copy)
 
 TPZCompElPostProc (TPZCompMesh &mesh, const TPZCompElPostProc< TCOMPEL > &copy, std::map< int64_t, int64_t > &gl2lcConMap, std::map< int64_t, int64_t > &gl2lcElMap)
 Used to generate patch mesh... generates a map of connect index from global mesh to clone mesh. More...
 
void InitializeShapeFunctions ()
 Initializes the shape function type in order to allow non ill-conditioned L2 Transfer matrix. More...
 
virtual TPZCompElClone (TPZCompMesh &mesh) const override
 
virtual TPZCompElClonePatchEl (TPZCompMesh &mesh, std::map< int64_t, int64_t > &gl2lcConMap, std::map< int64_t, int64_t > &gl2lcElMap) const override
 Create a copy of the given element. The clone copy have the connect indexes mapped to the local clone connects by the given map. More...
 
virtual void Print (std::ostream &out=std::cout) const override
 Prints element data. More...
 
void ComputeRequiredData (TPZMaterialData &data, TPZVec< REAL > &qsi) override
 
virtual void CalcResidual (TPZElementMatrix &ef) override
 The CalcResidual reimplementation is in charge of extracting the data from the referred compEl at the integration points and building a minimum square residual method to extrapolate this information throughout the element subdomain. The final ef vector shall be copied onto the solution vector, as it represents the shape functions multipliers of the extrapolation functions. More...
 
virtual void CalcStiff (TPZElementMatrix &ek, TPZElementMatrix &ef) override
 Null implementation of the CalcStiff in order to ensure it wouldn't produce any valid system of equations. More...
 
bool dataequal (TPZMaterialData &d1, TPZMaterialData &d2)
 Compare some fields of 2 TPZMaterialData and return true if these do match. More...
 
virtual void ComputeSolution (TPZVec< REAL > &qsi, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphix, const TPZFMatrix< REAL > &axes, TPZSolVec &sol, TPZGradSolVec &dsol) override
 Avoids the calling of the TPZCompElReferred::ComputeSolution wich would attempt to append solution of the referred element. Computes solution and its derivatives in 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) override
 Avoids the calling of the TPZCompElReferred::ComputeSolution wich would attempt to append solution of the referred element. More...
 
virtual void ComputeShape (TPZVec< REAL > &intpoint, TPZVec< REAL > &X, TPZFMatrix< REAL > &jacobian, TPZFMatrix< REAL > &axes, REAL &detjac, TPZFMatrix< REAL > &jacinv, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, TPZFMatrix< REAL > &dphidx) override
 Reimplemented in order to ensure the shape functions are computed with local support and thus benefits from the orthogonality properties of the legendre polynomials defined by the method InitializeShapeFunctios(). More...
 
int ClassId () const override
 write the element data to a stream 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...
 
- Public Member Functions inherited from TPZReferredCompEl< TCOMPEL >
 TPZReferredCompEl (TPZCompMesh &mesh, TPZGeoEl *gel, int64_t &index)
 Class constructor. More...
 
 TPZReferredCompEl ()
 
 TPZReferredCompEl (TPZCompMesh &mesh, const TPZReferredCompEl< TCOMPEL > &copy)
 
 TPZReferredCompEl (TPZCompMesh &mesh, const TPZReferredCompEl< TCOMPEL > &copy, std::map< int64_t, int64_t > &gl2lcConMap, std::map< int64_t, int64_t > &gl2lcElMap)
 
 ~TPZReferredCompEl ()
 Class destructor. More...
 
virtual void SetCreateFunctions (TPZCompMesh *mesh) override
 Set create function in TPZCompMesh to create elements of this type. More...
 
TPZCompElReferredElement ()
 Returns referred element of this. More...
 
virtual void ComputeSolution (TPZVec< REAL > &qsi, TPZMaterialData &data) override
 Computes solution and its derivatives in local coordinate qsi. More...
 
int ClassId () const override
 
template<>
void SetCreateFunctions (TPZCompMesh *mesh)
 

Additional Inherited Members

- Protected Member Functions inherited from TPZReferredCompEl< TCOMPEL >
void AppendOtherSolution (TPZVec< REAL > &qsi, TPZSolVec &sol, TPZGradSolVec &dsol, TPZFMatrix< REAL > &axes)
 Append solution of the referred element. More...
 
void AppendOtherSolution (TPZVec< REAL > &qsi, TPZSolVec &sol)
 Append solution of the referred element. More...
 
void AppendOtherSolution (TPZVec< REAL > &qsi, TPZSolVec &sol, TPZGradSolVec &dsol, const TPZFMatrix< REAL > &axes)
 Append solution of the referred element. More...
 
void AppendOtherSolution (TPZVec< REAL > &qsi, TPZVec< REAL > &normal, TPZSolVec &leftsol, TPZGradSolVec &dleftsol, TPZFMatrix< REAL > &leftaxes, TPZSolVec &rightsol, TPZGradSolVec &drightsol, TPZFMatrix< REAL > &rightaxes)
 Append solution of the referred element. More...
 
template<>
void AppendOtherSolution (TPZVec< REAL > &qsi, TPZSolVec &sol, TPZGradSolVec &dsol, TPZFMatrix< REAL > &axes)
 

Detailed Description

template<class TCOMPEL>
class TPZCompElPostProc< TCOMPEL >

This class implements the TPZCompEl structure to enable copying the solution of the referred compEl at the integration points to itself and interpolating it inside the element.

Since
May, 1 2009

Definition at line 46 of file pzcompelpostproc.h.

Constructor & Destructor Documentation

◆ TPZCompElPostProc() [1/4]

template<class TCOMPEL >
TPZCompElPostProc< TCOMPEL >::TPZCompElPostProc ( )
inline

◆ ~TPZCompElPostProc()

template<class TCOMPEL >
TPZCompElPostProc< TCOMPEL >::~TPZCompElPostProc ( )
inlinevirtual

Definition at line 172 of file pzcompelpostproc.h.

◆ TPZCompElPostProc() [2/4]

template<class TCOMPEL >
TPZCompElPostProc< TCOMPEL >::TPZCompElPostProc ( TPZCompMesh mesh,
TPZGeoEl gel,
int64_t &  index 
)
inline

◆ TPZCompElPostProc() [3/4]

template<class TCOMPEL >
TPZCompElPostProc< TCOMPEL >::TPZCompElPostProc ( TPZCompMesh mesh,
const TPZCompElPostProc< TCOMPEL > &  copy 
)
inline

◆ TPZCompElPostProc() [4/4]

template<class TCOMPEL >
TPZCompElPostProc< TCOMPEL >::TPZCompElPostProc ( TPZCompMesh mesh,
const TPZCompElPostProc< TCOMPEL > &  copy,
std::map< int64_t, int64_t > &  gl2lcConMap,
std::map< int64_t, int64_t > &  gl2lcElMap 
)
inline

Used to generate patch mesh... generates a map of connect index from global mesh to clone mesh.

Definition at line 189 of file pzcompelpostproc.h.

References TPZCompElPostProc< TCOMPEL >::InitializeShapeFunctions().

Member Function Documentation

◆ CalcResidual()

template<class TCOMPEL >
void TPZCompElPostProc< TCOMPEL >::CalcResidual ( TPZElementMatrix ef)
inlineoverridevirtual

The CalcResidual reimplementation is in charge of extracting the data from the referred compEl at the integration points and building a minimum square residual method to extrapolate this information throughout the element subdomain. The final ef vector shall be copied onto the solution vector, as it represents the shape functions multipliers of the extrapolation functions.

boundary discontinuous elements have this characteristic

Definition at line 256 of file pzcompelpostproc.h.

References TPZMaterialData::axes, TPZMultiphysicsElement::ComputeRequiredData(), TPZCompElPostProc< TCOMPEL >::ComputeRequiredData(), TPZInterpolationSpace::ComputeRequiredData(), TPZInterpolationSpace::ComputeShape(), TPZCompElPostProc< TCOMPEL >::ComputeShape(), TPZPostProcMat::Contribute(), DebugStop, TPZMaterialData::detjac, TPZMaterialData::dphi, TPZMaterialData::dphix, TPZMaterialData::dsol, fabs, TPZElementMatrix::fMat, TPZMaterialData::fNeedsSol, TPZCompEl::GetIntegrationRule(), TPZPostProcMat::GetPostProcessVarIndexList(), TPZPostProcMat::GetPostProcVarName(), TPZMatrix< TVar >::GetSub(), TPZInterpolationSpace::InitMaterialData(), TPZMaterialData::intLocPtIndex, TPZMaterialData::jacinv, TPZMaterialData::jacobian, LOGPZ_DEBUG, TPZCompEl::Material(), TPZInterpolationSpace::MaxOrder(), TPZFMatrix< TVar >::MultAdd(), TPZVec< T >::NElements(), Norm(), TPZIntPoints::NPoints(), TPZMaterial::NSolutionVariables(), TPZPostProcMat::NStateVariables(), TPZMaterialData::p, TPZMaterialData::phi, TPZIntPoints::Point(), TPZMatrix< TVar >::Print(), PZError, TPZReferredCompEl< TCOMPEL >::ReferredElement(), TPZElementMatrix::Reset(), TPZManVector< T, NumExtAlloc >::Resize(), TPZVec< T >::Resize(), TPZMatrix< TVar >::Rows(), TPZMaterialData::sol, TPZMaterial::Solution(), TPZCompEl::Solution(), TPZMatrix< TVar >::Solve_LU(), substruct_tst14.test::status, and TPZMaterialData::x.

◆ CalcStiff()

template<class TCOMPEL >
void TPZCompElPostProc< TCOMPEL >::CalcStiff ( TPZElementMatrix ek,
TPZElementMatrix ef 
)
inlineoverridevirtual

Null implementation of the CalcStiff in order to ensure it wouldn't produce any valid system of equations.

Definition at line 438 of file pzcompelpostproc.h.

References PZError.

◆ ClassId()

template<class TCOMPEL >
int TPZCompElPostProc< TCOMPEL >::ClassId ( ) const
override

write the element data to a stream

Definition at line 229 of file pzcompelpostproc.h.

References TPZReferredCompEl< TCOMPEL >::ClassId(), and Hash().

◆ Clone()

template<class TCOMPEL >
TPZCompEl * TPZCompElPostProc< TCOMPEL >::Clone ( TPZCompMesh mesh) const
inlineoverridevirtual

Definition at line 199 of file pzcompelpostproc.h.

◆ ClonePatchEl()

template<class TCOMPEL >
TPZCompEl * TPZCompElPostProc< TCOMPEL >::ClonePatchEl ( TPZCompMesh mesh,
std::map< int64_t, int64_t > &  gl2lcConMap,
std::map< int64_t, int64_t > &  gl2lcElMap 
) const
inlineoverridevirtual

Create a copy of the given element. The clone copy have the connect indexes mapped to the local clone connects by the given map.

Parameters
meshPatch clone mesh
gl2lcConMapmap the connects indexes from global element (original) to the local copy.
gl2lcElMapmap the indexes of the elements between the original element and the patch element

Definition at line 204 of file pzcompelpostproc.h.

◆ ComputeRequiredData()

template<class TCOMPEL >
void TPZCompElPostProc< TCOMPEL >::ComputeRequiredData ( TPZMaterialData data,
TPZVec< REAL > &  qsi 
)
inlineoverride

Definition at line 218 of file pzcompelpostproc.h.

Referenced by TPZCompElPostProc< TCOMPEL >::CalcResidual().

◆ ComputeShape()

template<class TCOMPEL >
void TPZCompElPostProc< TCOMPEL >::ComputeShape ( TPZVec< REAL > &  intpoint,
TPZVec< REAL > &  X,
TPZFMatrix< REAL > &  jacobian,
TPZFMatrix< REAL > &  axes,
REAL &  detjac,
TPZFMatrix< REAL > &  jacinv,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi,
TPZFMatrix< REAL > &  dphidx 
)
inlineoverridevirtual

Reimplemented in order to ensure the shape functions are computed with local support and thus benefits from the orthogonality properties of the legendre polynomials defined by the method InitializeShapeFunctios().

Compute shape functions based on master element in the classical FEM manner.

Definition at line 491 of file pzcompelpostproc.h.

References TPZGeoEl::Jacobian(), PZError, Shape(), and TPZGeoEl::X().

Referenced by TPZCompElPostProc< TCOMPEL >::CalcResidual().

◆ ComputeSolution() [1/2]

template<class TCOMPEL >
void TPZCompElPostProc< TCOMPEL >::ComputeSolution ( TPZVec< REAL > &  qsi,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphix,
const TPZFMatrix< REAL > &  axes,
TPZSolVec sol,
TPZGradSolVec dsol 
)
inlineoverridevirtual

Avoids the calling of the TPZCompElReferred::ComputeSolution wich would attempt to append solution of the referred element. Computes solution and its derivatives in local coordinate qsi.

Parameters
qsimaster element coordinate
phimatrix containing shape functions compute in qsi point
dphixmatrix containing the derivatives of shape functions in the direction of the axes
axesdirection of the derivatives
solfinite element solution
dsolsolution derivatives

Definition at line 473 of file pzcompelpostproc.h.

◆ ComputeSolution() [2/2]

template<class TCOMPEL >
void TPZCompElPostProc< TCOMPEL >::ComputeSolution ( TPZVec< REAL > &  qsi,
TPZVec< REAL > &  normal,
TPZSolVec leftsol,
TPZGradSolVec dleftsol,
TPZFMatrix< REAL > &  leftaxes,
TPZSolVec rightsol,
TPZGradSolVec drightsol,
TPZFMatrix< REAL > &  rightaxes 
)
inlineoverridevirtual

Avoids the calling of the TPZCompElReferred::ComputeSolution wich would attempt to append solution of the referred element.

Note
Computes solution and its derivatives in the local coordinate qsi.
This method will function for both volumetric and interface elements
Parameters
qsimaster element coordinate of the interface element
normalunitary vector output normal at boundary
leftsolfinite element solution
dleftsolsolution derivatives
leftaxesaxes associated with the left solution
rightsolfinite element solution
drightsolsolution derivatives
rightaxesaxes associated with the right solution

Reimplemented from TPZReferredCompEl< TCOMPEL >.

Definition at line 483 of file pzcompelpostproc.h.

◆ dataequal()

template<class TCOMPEL >
bool TPZCompElPostProc< TCOMPEL >::dataequal ( TPZMaterialData d1,
TPZMaterialData d2 
)
inline

Compare some fields of 2 TPZMaterialData and return true if these do match.

Definition at line 444 of file pzcompelpostproc.h.

References DebugStop, TPZVec< T >::NElements(), TPZMaterialData::p, TPZMaterialData::phi, pow(), test::res, TPZMatrix< TVar >::Rows(), and TPZMaterialData::x.

◆ InitializeShapeFunctions()

template<class TCOMPEL >
void TPZCompElPostProc< TCOMPEL >::InitializeShapeFunctions ( )
inline

Initializes the shape function type in order to allow non ill-conditioned L2 Transfer matrix.

Definition at line 209 of file pzcompelpostproc.h.

Referenced by TPZCompElPostProc< TCOMPEL >::TPZCompElPostProc().

◆ Print()

template<class TCOMPEL>
virtual void TPZCompElPostProc< TCOMPEL >::Print ( std::ostream &  out = std::cout) const
inlineoverridevirtual

Prints element data.

Parameters
outindicates the device where the data will be printed

Reimplemented from TPZReferredCompEl< TCOMPEL >.

Definition at line 85 of file pzcompelpostproc.h.

References TPZReferredCompEl< TCOMPEL >::Print().

◆ Read()

template<class TCOMPEL >
void TPZCompElPostProc< TCOMPEL >::Read ( TPZStream buf,
void *  context 
)
inlineoverride

Read the element data from a stream.

Definition at line 247 of file pzcompelpostproc.h.

◆ Write()

template<class TCOMPEL >
void TPZCompElPostProc< TCOMPEL >::Write ( TPZStream buf,
int  withclassid 
) const
inlineoverride

Save the element data to a stream.

write the element data to a stream

Definition at line 238 of file pzcompelpostproc.h.


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