NeoPZ
pzreferredcompel.h
Go to the documentation of this file.
1 
6 #ifndef PZSPECIAL
7 #define PZSPECIAL
8 
9 struct TPZElementMatrix;
10 class TPZCompEl;
11 #include "pzintel.h"
12 class TPZGeoEl;
13 class TPZCompMesh;
14 #include "pzfmatrix.h"
15 #include "pzvec.h"
16 #include "pzmanvector.h"
17 #include "pzmaterialdata.h"
18 #include <map>
19 #include <set>
20 
25 template<class TCOMPEL>
26 class TPZReferredCompEl : public TCOMPEL {
27 public:
28 
30  TPZReferredCompEl(TPZCompMesh &mesh, TPZGeoEl *gel, int64_t &index);
31 
33 
35 
37  const TPZReferredCompEl<TCOMPEL> &copy,
38  std::map<int64_t,int64_t> & gl2lcConMap,
39  std::map<int64_t,int64_t> & gl2lcElMap);
40 
43 
45  virtual void SetCreateFunctions(TPZCompMesh *mesh) override;
46 
49 
59 // virtual void ComputeSolution(TPZVec<REAL> &qsi, TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphix,
60 // const TPZFMatrix<REAL> &axes, TPZSolVec &sol, TPZGradSolVec &dsol);
61 
71  virtual void ComputeSolution(TPZVec<REAL> &qsi, TPZMaterialData &data) override;
72 
87  virtual void ComputeSolution(TPZVec<REAL> &qsi,
88  TPZVec<REAL> &normal,
89  TPZSolVec &leftsol, TPZGradSolVec &dleftsol,TPZFMatrix<REAL> &leftaxes,
90  TPZSolVec &rightsol, TPZGradSolVec &drightsol,TPZFMatrix<REAL> &rightaxes) override;
91 
96  virtual void Print(std::ostream & out = std::cout) const override;
97 
98  public:
99 int ClassId() const override;
100  public:
101 protected:
102 
105  TPZGradSolVec &dsol, TPZFMatrix<REAL> &axes);
106 
108  void AppendOtherSolution(TPZVec<REAL> &qsi, TPZSolVec &sol);
109 
112  TPZGradSolVec &dsol, const TPZFMatrix<REAL> &axes);
113 
115  void AppendOtherSolution(TPZVec<REAL> &qsi, TPZVec<REAL> &normal,
116  TPZSolVec &leftsol, TPZGradSolVec &dleftsol, TPZFMatrix<REAL> &leftaxes,
117  TPZSolVec &rightsol, TPZGradSolVec &drightsol,TPZFMatrix<REAL> &rightaxes);
118 };
119 
122  TPZFMatrix<STATE> &dsolto, const TPZFMatrix<REAL> &axesto);
123 
125 TPZCompEl *CreateReferredDisc(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
127 TPZCompEl *CreateReferredPointEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
129 TPZCompEl *CreateReferredLinearEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
131 TPZCompEl *CreateReferredQuadEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
133 TPZCompEl *CreateReferredTriangleEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
135 TPZCompEl *CreateReferredCubeEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
137 TPZCompEl *CreateReferredPrismEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
139 TPZCompEl *CreateReferredPyramEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
141 TPZCompEl *CreateReferredTetraEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
142 
144 template<class TVar>
145 void Append(TPZVec<TVar> &u1, TPZVec<TVar> &u2, TPZVec<TVar> &u12);
148 template<class TVar>
151 bool AreEqual(const TPZVec<REAL> &A, const TPZVec<REAL> &B, REAL tol = 1e-10);
152 
153 #endif
TPZCompEl * CreateReferredLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates linear referred computational element related with geometric element gel. ...
TPZCompEl * CreateReferredTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates triangular referred computational element related with geometric element gel.
virtual void ComputeSolution(TPZVec< REAL > &qsi, TPZMaterialData &data) override
Computes solution and its derivatives in local coordinate qsi.
int ClassId() const override
Templated vector implementation.
TPZCompEl * CreateReferredQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates quadrilateral referred computational element related with geometric element gel...
void AdjustSolutionDerivatives(TPZFMatrix< STATE > &dsolfrom, TPZFMatrix< REAL > &axesfrom, TPZFMatrix< STATE > &dsolto, const TPZFMatrix< REAL > &axesto)
Adjust the derivatives from one system of axes to the other.
TPZCompEl * CreateReferredPyramEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates pyramidal referred computational element related with geometric element gel.
TPZCompEl * CreateReferredTetraEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates tetrahedral referred computational element related with geometric element gel...
static const double tol
Definition: pzgeoprism.cpp:23
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
Contains TPZMatrixclass which implements full matrix (using column major representation).
virtual void SetCreateFunctions(TPZCompMesh *mesh) override
Set create function in TPZCompMesh to create elements of this type.
Free store vector implementation.
void Append(TPZVec< TVar > &u1, TPZVec< TVar > &u2, TPZVec< TVar > &u12)
Append u2 vector after u1 vector in u12 vector.
Contains the TPZMaterialData class which implements an interface between TPZCompEl::CalcStiff and TPZ...
This class associates an element matrix with the coeficients of its contribution in the global stiffn...
Definition: pzelmat.h:30
void AppendOtherSolution(TPZVec< REAL > &qsi, TPZSolVec &sol, TPZGradSolVec &dsol, TPZFMatrix< REAL > &axes)
Append solution of the referred element.
~TPZReferredCompEl()
Class destructor.
TPZCompEl * CreateReferredPrismEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates prismal referred computational element related with geometric element gel.
virtual void Print(std::ostream &out=std::cout) const override
Prints element data.
Template to generate computational elements. Computational Element.
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
Contains declaration of TPZInterpolatedElement class which implements computational element of the in...
TPZCompEl * CreateReferredDisc(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates discontinuous referred computational element related with geometric element gel...
TPZCompEl * ReferredElement()
Returns referred element of this.
bool AreEqual(const TPZVec< REAL > &A, const TPZVec< REAL > &B, REAL tol=1e-10)
Returns true whether for all the entries of the matrices.
TPZCompEl * CreateReferredCubeEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates cube referred computational element related with geometric element gel.
TPZCompEl * CreateReferredPointEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates point referred computational element related with geometric element gel.
Defines the interface of a computational element. Computational Element.
Definition: pzcompel.h:59