18 static LoggerPtr logger(Logger::getLogger(
"pz.mesh.TPZCompElHDivPressure"));
25 template<
class TSHAPE>
73 if(logger->isDebugEnabled())
75 std::stringstream sout;
76 sout <<
"After creating last pressure connect " << newnodeindex << std::endl;
89 template<class TSHAPE>
99 template<
class TSHAPE>
101 std::map<int64_t,int64_t> & gl2lcConMap, std::map<int64_t,int64_t> & gl2lcElMap) :
109 template<
class TSHAPE>
117 template<
class TSHAPE>
130 template<
class TSHAPE>
132 return TSHAPE::Type();
135 template<
class TSHAPE>
140 std::stringstream sout;
141 sout << endl<<
"Ordem da Variavel dual: "<<
fPressureOrder<<std::endl;
148 template<class TSHAPE>
153 template<
class TSHAPE>
159 template<
class TSHAPE>
163 std::cout <<
" TPZCompElHDivPressure<TSHAPE>::SetConnectIndex index " << i <<
171 if(logger->isDebugEnabled())
173 std::stringstream sout;
174 sout << endl<<
"Setting Connect : " << i <<
" to connectindex " << connectindex<<std::endl;
180 template<class TSHAPE>
207 template<
class TSHAPE>
216 template<
class TSHAPE>
229 std::cout <<
"TPZCompElHDivPressure::ConnectIndex wrong parameter connect " << con <<
230 " NConnects " << this->
NConnects() << std::endl;
236 int con2= con-TSHAPE::NCornerNodes;
254 template<
class TSHAPE>
264 template<
class TSHAPE>
277 template<
class TSHAPE>
284 if( side == TSHAPE::NSides)
291 Append(dphi2, dphi1, dphi);
298 template<
class TSHAPE>
314 template<
class TSHAPE>
321 template<
class TSHAPE>
329 template<
class TSHAPE>
335 template<
class TSHAPE>
339 const int nshape = this->
NShapeF();
353 template<
class TSHAPE>
362 int64_t numbersol = MeshSol.
Cols();
367 for (int64_t is=0; is<numbersol; is++) {
373 int iv = 0,ishape=0,ivec=0,cols, jv=0;
374 for(
int in=0; in<ncon-1 ; in++) {
377 int dfvar = block.
Size(dfseq);
378 int64_t pos = block.
Position(dfseq);
380 for(
int jn=0; jn<dfvar; jn++) {
391 for (
int ilinha=0; ilinha<this->
Dimension(); ilinha++) {
399 for (int64_t is=0; is<numbersol; is++) {
400 data.
sol[is][ilinha] += data.
fNormalVec(ilinha,ivec)* data.
phi(ishape,0)*MeshSol(pos+jn,is);
401 data.
sol[is][nsol-1] += axesvec(ilinha,0)*data.
dphix(ilinha,ishape)*MeshSol(pos+jn,is);
418 int64_t pos2 = block.
Position(dfseq2);
422 for (int64_t is=0; is<numbersol; is++) {
423 data.
sol[is][nsol-2]+= data.
phi(iphi,0)*MeshSol(pos2+idesc,is);
431 template<
class TSHAPE>
434 bool Is_u1PHI = (u1.
Cols() == 1) ?
true :
false;
435 bool Is_u2PHI = (u2.
Cols() == 1) ?
true :
false;
437 if(Is_u1PHI && Is_u2PHI)
439 int64_t nu1 = u1.
Rows(),nu2 = u2.
Rows();
440 u12.
Redim(nu1+nu2,1);
442 for(i=0; i<nu1; i++) u12(i,0) = u1(i,0);
443 for(i=0; i<nu2; i++) u12(i+nu1,0) = u2(i,0);
447 else if(!Is_u1PHI || !Is_u2PHI)
450 int64_t ru12 = ru1 < ru2 ? ru2 : ru1;
451 int64_t cu12 = cu1+cu2;
452 u12.
Redim(ru12,cu12);
454 for(i=0; i<ru1; i++)
for(j=0; j<cu1; j++) u12(i,j) = u1(i,j);
455 for(i=0; i<ru2; i++)
for(j=0; j<cu2; j++) u12(i,j+cu1) = u2(i,j);
459 PZError <<
"TPZCompElHDivPressure::Append. Bad input parameters " << std::endl;
469 template<
class TSHAPE>
482 template<
class TSHAPE>
521 this->
Append(phiCont,phiDisc,phi);
522 this->
Append(dphiCont,dphiDisc,dphi);
533 template<
class TSHAPE>
535 return TSHAPE::TransformSideToElement(side);
543 template<
class TSHAPE>
558 template<
class TSHAPE>
569 buf.
Write ( &classid, 1 );
575 template<
class TSHAPE>
586 buf.
Read( &classid, 1 );
587 if ( classid != this->
ClassId() )
589 std::stringstream sout;
590 sout <<
"ERROR - " << __PRETTY_FUNCTION__
591 <<
" trying to restore an object id " << this->
ClassId() <<
" for an package of id = " << classid;
645 template<
class TSHAPE>
647 if(dimension == TSHAPE::Dimension && this->
Material()->Id() > 0) {
648 new typename TSHAPE::GraphElType(
this,&grafgrid);
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout)
Returns the solution associated with the var index based on the finite element approximation.
Represents a graphical mesh used for post processing purposes. Post processing.
void Shape(TPZVec< REAL > &pt, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override
Computes the shape function set at the point x.
Contains TPZShapeTetra class which implements the shape functions of a tetrahedral element...
void Append(TPZFMatrix< REAL > &u1, TPZFMatrix< REAL > &u2, TPZFMatrix< REAL > &u12)
To append vectors.
virtual void Print(std::ostream &out=std::cout) const override
Prints the relevant data of the element to the output stream.
Contains the TPZGraphElTd class which implements the graphical discontinuous triangular element...
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
virtual void Solution(TPZVec< REAL > &qsi, int var, TPZVec< STATE > &sol) override
Compute the solution for a given variable.
int Position(const int block_diagonal) const
Returns the position of first element block dependent on matrix diagonal.
int Set(const int index, const int dim, const int pos=-1)
Modifies existing block dimensions or creates a new block with given index.
Represents a set of shape functions associated with a computational element/side. Computational Eleme...
virtual void SideShapeFunction(int side, TPZVec< REAL > &point, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override
Computes the values of the shape function of the side.
Contains definitions to LOGPZ_DEBUG, LOGPZ_INFO, LOGPZ_WARN, LOGPZ_ERROR and LOGPZ_FATAL, and the implementation of the inline InitializePZLOG(string) function using log4cxx library or not. It must to be called out of "#ifdef LOG4CXX" scope.
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
virtual void InitMaterialData(TPZMaterialData &data) override
Initialize a material data and its attributes based on element dimension, number of state variables a...
TPZCompEl * CreateHDivPressurePrismEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational prismal element for HDivPressure approximate space.
void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
void Write(TPZStream &buf, int withclassid) const override
Save the element data to a stream.
virtual void ShapeDual(TPZVec< REAL > &qsi, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Compute the shape functions corresponding to the dual space.
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
virtual int64_t AllocateNewConnect(int nshape, int nstate, int order)
Returns an index to a new connect.
virtual int Dimension() const override
Returns the dimension of the element.
void ComputeSolutionPressureHDiv(TPZVec< REAL > &qsi, TPZMaterialData &data)
groups all classes dedicated to the computation of shape functions
Contains the TPZPoint class which defines the topology of a point.
virtual void SetPressureOrder(int ord)
Identifies the interpolation order for pressure variable.
Contains the TPZRefQuad class which implements the uniform refinement of a geometric quadrilateral el...
void SetLagrangeMultiplier(unsigned char mult)
Set the connect as a pressure connect or not.
void Shape(TPZVec< REAL > &pt, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override
Computes the shape function set at the point x.
void degree(int root, int adj_num, int adj_row[], int adj[], int mask[], int deg[], int *iccsze, int ls[], int node_num)
virtual void RemoveSideRestraintsII(MInsertMode mode)
Delete the restraints on the nodes of the connected elements if necessary.
virtual int NStateVariables() const =0
Returns the number of state variables associated with the material.
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
MShapeFunctionType fShapeType
TPZFNMatrix< 9, REAL > jacinv
value of the inverse of the jacobian at the integration point
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
TPZFNMatrix< 9, REAL > jacobian
value of the jacobian at the integration point
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
Contains the TPZTriangle class which defines the topology of a triangle.
int p
maximum polinomial order of the shape functions
virtual void GetInterpolationOrder(TPZVec< int > &ord) override
Identifies the interpolation order on the interior of the element.
Contains TPZShapeLinear class which implements the shape functions of a linear one-dimensional elemen...
Contains the TPZRefPyramid class which implements the uniform refinement of a geometric hexahedral el...
int NShapeF() const override
Returns the total number of shapefunctions.
Contains the TPZTetrahedron class which defines the topology of the tetrahedron element.
TPZCompEl * CreateHDivPressureTetraEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational tetrahedral element for HDivPressure approximate space.
virtual int ConnectOrder(int connect) const override
void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
int ClassId() const override
Returns the unique identifier for reading/writing objects to streams.
virtual int MaxOrder() override
Return the maximum order??
Contains TPZShapeCube class which implements the shape functions of a hexaedral element.
virtual TPZMaterial * Material() const
Identify the material object associated with the element.
static void Shape(int dimension, REAL C, TPZVec< REAL > &X0, TPZVec< REAL > &X, int degree, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, MShapeType type)
virtual ~TPZCompElHDivPressure()
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object reallocating the necessary storage, copying the existing objects to the new...
Contains the TPZRefPrism class which implements the uniform refinement of a geometric prism element...
virtual void ComputeSolution(TPZVec< REAL > &qsi, TPZSolVec &sol, TPZGradSolVec &dsol, TPZFMatrix< REAL > &axes) override
Computes solution and its derivatives in the local coordinate qsi.
TPZCompEl * CreateHDivPressureLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational linear element for HDivPressure approximate space.
int64_t SequenceNumber() const
Returns the Sequence number of the connect object.
Groups all classes defining the structure of the master element.
virtual void InitMaterialData(TPZMaterialData &data) override
Initialize a material data and its attributes based on element dimension, number of state variables a...
Contains the TPZGraphElT3d class which implements the graphical representation of a tetrahedra elemen...
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)
Compute shape functions based on master element in the classical FEM manner.
virtual void Write(const bool val)
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Contains the TPZGraphElQ2dd class which implements the graphical two-dimensional discontinuous elemen...
Contains the TPZGeoTetrahedra class which implements the geometry of a tetrahedral element...
#define DebugStop()
Returns a message to user put a breakpoint in.
virtual int NConnects() const override
Returns the number of connect objects of the element.
TPZFNMatrix< 180 > fNormalVec
list of normal vectors
Contains the TPZGraphElPrismMapped class which implements the graphical element for a prism using a d...
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
TPZCompMesh * Mesh() const
Return a pointer to the grid of the element.
void Read(TPZStream &buf, void *context) override
Read the element data from a stream.
Contains the TPZQuadrilateral class which defines the topology of a quadrilateral element...
virtual void SetConnectIndex(int i, int64_t connectindex) override
Sets the node pointer of node i to nod.
TPZCompEl * Reference() const
Return a pointer to the element referenced by the geometric element.
int64_t Rows() const
Returns number of rows.
int numberdualfunctions
number of dual function (e.g. pressure in HDiv approximations)
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
virtual void SetPreferredOrder(int order) override
Sets the preferred interpolation order along a side.
const TPZBlock< STATE > & Block() const
Access the block structure of the solution vector.
Contains the TPZGraphElPyramidMapped class which implements the graphical element for a pyramid using...
Contains declaration of TPZCompelDisc class which implements a computational element for discontinuou...
TPZAdmChunkVector< TPZConnect > & ConnectVec()
Return a reference to the connect pointers vector.
T * begin() const
Casting operator. Returns The fStore pointer.
Contains the TPZMaterialData class which implements an interface between TPZCompEl::CalcStiff and TPZ...
Implements a generic computational element to HDiv scope. Computational Element.
Contains TPZShapePoint class which implements the shape function associated with a point...
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
Contains declaration of TPZCompMesh class which is a repository for computational elements...
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
virtual TPZConnect & Connect(int i) const
Returns a pointer to the ith node.
Contains the TPZPyramid class which defines the topology of a pyramid element.
Contains the TPZGeoPoint class which implements the geometry of a point element or 0-D element...
Contains declaration of TPZCompElHDivPressure class which implements a generic computational element ...
virtual int64_t ConnectIndex(int node) const override
Returns the index of the ith connectivity of the element.
Contains TPZShapePrism class which implements the shape functions of a prism element.
Contains the TPZRefTriangle class which implements the uniform refinement of a geometric triangular e...
TPZManVector< int64_t, TSHAPE::NSides > fConnectIndexes
Indexes of the connects associated with the elements.
virtual int NConnects() const override
Returns the number of connect objects of the element.
Contains the TPZRefTetrahedra class which implements the uniform refinement of a geometric tetrahedra...
virtual int Dimension() const =0
Returns the dimension of the element.
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
virtual void X(TPZVec< REAL > &qsi, TPZVec< REAL > &result) const =0
Return the coordinate in real space of the point coordinate in the master element space...
TPZTransform TransformSideToElement(int side) override
Returns the transformation which transform a point from the side to the interior of the element...
MElementType
Define the element types.
void ResetReference()
Reset the element referenced by the geometric element to NULL.
Contains declaration of TPZCompElHDivBound2 class which implements a generic computational element (H...
Implements computational mesh. Computational Mesh.
int Size(const int block_diagonal) const
Returns block dimension.
TSHAPE::IntruleType fIntRule
Integration rule associated with the topology of the element.
virtual void Multiply(const TPZFMatrix< TVar > &A, TPZFMatrix< TVar > &res, int opt=0) const
It mutiplies itself by TPZMatrix<TVar>A putting the result in res.
virtual int NConnectShapeF(int connect, int order) const override
Number of shapefunctions of the connect associated.
virtual void SideShapeFunction(int side, TPZVec< REAL > &point, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi) override
Computes the values of the shape function of the side.
Contains the TPZGraphElT2dMapped class which implements a graphical element for a triangle mapped int...
Contains the TPZRefLinear class which implements the uniform refinement of a geometric linear element...
void Fill(const T ©, const int64_t from=0, const int64_t numelem=-1)
Will fill the elements of the vector with a copy object.
Contains the declaration of the shape function discontinuous.
int64_t Cols() const
Returns number of cols.
TPZCompEl * CreateHDivPressureCubeEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational cube element for HDivPressure approximate space.
virtual MElementType Type() override
Return the type of the element.
Contains TPZShapePiram class which implements the shape functions of a pyramid element.
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
void CreateGraphicalElement(TPZGraphMesh &grafgrid, int dimension) override
Creates corresponding graphical element(s) if the dimension matches graphical elements are used to ge...
Contains the TPZGeoPyramid class which implements the geometry of pyramid element.
TPZRegisterClassId()=default
Defines the interface for saving and reading data. Persistency.
TPZCompEl * CreateHDivPressureQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational quadrilateral element for HDivPressure approximate space.
Contains the TPZGraphEl1dd class which implements the graphical one dimensional discontinuous element...
This class implements a "generic" computational element to HDiv scope. Computational Element...
Contains the TPZGeoPrism class which implements the geometry of a prism element.
Contains the TPZCube class which defines the topology of the hexahedron element.
Contains the TPZLine class which defines the topology of a line element.
TPZCompEl * CreateHDivPressureTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational triangular element for HDivPressure approximate space.
Groups all classes which model the geometry.
int fPreferredOrder
Preferred polynomial order.
TPZManVector< std::pair< int, int64_t > > fVecShapeIndex
correspondence between normal vector index and index of the shape functions
virtual int ConnectOrder(int connect) const override
return the interpolation order of the polynomial for connect
static int NShapeF(int degree, int dimension, MShapeType type)
Number of shapefunctions dependent on the dimension and order of interpolation.
int fPressureOrder
Defines the interpolation order for pressure variable.
Contains the TPZPrism class which defines the topology of a Prism.
Defines the interface of a computational element. Computational Element.
TPZSolVec sol
vector of the solutions at the integration point
Contains TPZShapeQuad class which implements the shape functions of a quadrilateral element...
Contains the TPZRefCube class which implements the uniform refinement of a geometric hexahedral eleme...
virtual int NConnectShapeF(int connect, int order) const override
Number of shapefunctions of the connect associated.
Contains the TPZGraphElQ3dd class which implements the graphical three dimensional discontinuous elem...
Contains the TPZRefPoint class which implements the uniform refinement of a geometric point element...
TPZFMatrix< STATE > & Solution()
Access the solution vector.
TPZCompEl * CreateHDivPressurePyramEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational pyramidal element for HDivPressure approximate space.
Contains TPZShapeTriang class which implements the shape functions of a triangular element...
Implements an interface to register a class id and a restore function. Persistence.
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...
#define PZError
Defines the output device to error messages and the DebugStop() function.
virtual void Read(bool &val)