50 static LoggerPtr logger(Logger::getLogger(
"pz.mesh.tpzcompeldisc"));
59 this->SetDegree( this->Degree() );
64 this->SetDegree( this->Degree() );
69 this->SetDegree( this->Degree() );
74 this->SetDegree( this->Degree() );
80 for(int64_t iel = 0; iel < nel; iel++){
92 for(int64_t iel = 0; iel < nel; iel++){
143 std::map<int64_t,int64_t> &gl2lcConMap,
144 std::map<int64_t,int64_t> &gl2lcElMap) :
204 int nnodes = ref->
NNodes(),i;
205 if(nnodes == 1)
return 1.0;
211 maxdist =
sqrt(maxdist);
212 for(i=1;i<nnodes;i++){
218 if(maxdist < dist) maxdist =
dist;
229 PZError <<
"\nERROR AT " << __PRETTY_FUNCTION__ <<
" - this->Reference() == NULL\n";
232 ref->
Jacobian( intpoint, jacobian, axes, detjac , jacinv);
235 this->
Shape(intpoint,phi,dphi);
241 this->
ShapeX(X,phi,dphix);
245 for(
int i = 0; i < axes.
Rows(); i++) axes(i,i) = 1.;
257 this->
ShapeX(qsi,phi,dphi);
269 if(Degree < 0)
return;
297 PZError <<
"\nError at " << __PRETTY_FUNCTION__ <<
"\n";
303 phi.
Resize(ndiscphi+nextphi,1);
305 for(
int i = 0; i < ndiscphi; i++) {
306 phi(i,0) = ThisPhi(i,0);
308 for(
int i = 0; i < nextphi; i++) {
310 phi(i+ndiscphi,0) = extPhi[i].real();
312 phi(i+ndiscphi,0) = (REAL)extPhi[i];
321 PZError <<
"\nError at " << __PRETTY_FUNCTION__ <<
"\n";
329 const int64_t nderiv = ThisDPhi.
Rows();
330 dphi.
Resize(nderiv, ndiscdphi+nextdphi);
332 for(int64_t i = 0; i < nderiv; i++){
333 for(
int j = 0; j < ndiscdphi; j++){
334 dphi(i,j) = ThisDPhi(i,j);
337 for(int64_t i = 0; i < nderiv; i++){
338 for(
int j = 0; j < nextdphi; j++){
340 dphi(i,j+ndiscdphi) = extDPhi(i,j).real();
342 dphi(i,j+ndiscdphi) = (REAL)extDPhi(i,j);
351 out <<
"\nDiscontinous element : \n";
355 <<
"\tDegree of interpolation : " << this->
Degree() << endl
357 <<
"\tNormalizing constant : " <<
fConstC << endl
358 <<
"\tCenter point of the element : ";
370 Ref->
X(loccenter, xcenter);
371 out << xcenter << std::endl;
374 out <<
"\tDimension : " << this->
Dimension() << endl;
395 PZError <<
"\nTPZCompElDisc::CreateMidSideConnect Material nulo\n";
401 int nsides = ref->
NSides();
404 int existsconnect = 0;
412 int dimel = list[i].Element()->Reference()->Dimension();
413 if(dimel == dimgrid){
414 int64_t connectindex = list[i].Element()->ConnectIndex(0);
415 list[i].Element()->SetConnectIndex(0,connectindex);
457 return (discShape + nExtShape);
464 PZError <<
"\nFATAL ERROR AT " << __PRETTY_FUNCTION__
465 <<
" - TPZCompElDisc has only one connect and inod = " << inod <<
"\n";
487 int side = ref->
NSides()-1;
490 PZError <<
"TPZCompElDisc::SizeOfElement case not permited\n";
497 for(
int i=0;i<3;i++){
498 no0[i] = node0.
Coord(i);
499 no1[i] = node1.
Coord(i);
503 PZError <<
"TPZCompElDisc::SizeOfElement this in case that it is not contemplated\n";
511 if (
Mesh()->ElementVec()[index] !=
this) {
512 PZError <<
"TPZInterpolatedElement::Divide index error";
519 PZError << __PRETTY_FUNCTION__ <<
" no material\n";
528 ofstream mesh(
"MALHADIV.out");
556 for (i=0;i<nsubs;i++){
561 std::stringstream mess;
562 mess << __PRETTY_FUNCTION__ <<
" - discel is NULL ";
570 if (interpolatesolution){
572 for(i=0; i<nsubs; i++) {
575 std::stringstream mess;
576 mess << __PRETTY_FUNCTION__ <<
" - discel is NULL ";
599 int dfvar = fineblock.
Size(dfseq);
600 int64_t pos = fineblock.
Position(dfseq);
603 for(d=0; d<dfvar; d++) {
604 uh[iv%nstate] += (STATE)phix(iv/nstate,0)*FineMeshSol(pos+d,0);
613 int nsides = ref->
NSides();
615 if(dimension == 2 && to_postpro){
626 if(dimension == 3 && to_postpro){
645 if(dimension == 1 && this->
NConnects() ){
660 int nsides = this->
NSides();
692 PZError <<
"TPZCompElDisc::NFaces() - Unknown element shape!" << endl;
707 if(!subgel)
PZError <<
"TPZCompElDisc::AccumulateIntegrationRule data error, null geometric reference\n";
711 for(i=0;i<npoints;i++){
713 rule->
Point(i,pt,wt);
714 subgel->
Jacobian(pt,jacobian,axes,detjac,jacinv);
738 PZError <<
"TPZCompElDisc::CenterPoint center points not exists!\n";
747 int cornshape = coarsel.
NShapeF();
752 if(coarsedeg > locdeg) {
762 int integdeg = locdeg >= coarsedeg ? locdeg : coarsedeg;
784 int_point.
Fill(0.,0);
786 ref->
Jacobian( int_point, jacobian , axes, jac_det, jacinv);
787 REAL multiplier = 1./jac_det;
789 int numintpoints = intrule->
NPoints();
793 for(
int int_ind = 0; int_ind < numintpoints; ++int_ind) {
795 intrule->
Point(int_ind,int_point,weight);
796 ref->
Jacobian( int_point, jacobian , axes, jac_det, jacinv);
797 ref->
X(int_point, x);
798 Shape(int_point,locphi,locdphi);
802 coarsel.
Shape(int_point,corphi,cordphi);
804 for(lin=0; lin<locnshape; lin++) {
805 for(ljn=0; ljn<locnshape; ljn++) {
806 loclocmat(lin,ljn) += weight*locphi(lin,0)*locphi(ljn,0)*multiplier;
808 for(cjn=0; cjn<cornshape; cjn++) {
809 loccormat(lin,cjn) += weight*locphi(lin,0)*corphi(cjn,0)*multiplier;
823 if(locnshape == 0 || cornshape == 0)
824 PZError <<
"TPZCompElDisc::BuilTransferMatrix error I\n";
826 loccormat.
GetSub(0,0,locnshape,cornshape,smalll);
829 globblockvec.
Push(corblockseq);
833 PZError <<
"TPZCompElDisc::BuilTransferMatrix error II\n";
835 PZError <<
"TPZCompElDisc::BuilTransferMatrix error III\n";
837 if(cornshape == 0 || locnshape == 0)
838 PZError <<
"TPZCompElDisc::BuilTransferMatrix error IV\n";
839 loccormat.
GetSub(0,0,locnshape,cornshape,smalll);
852 PZError <<
"TPZCompElDisc::AccumulateVertices null reference\n";
855 int nvertices = geo->
NNodes();
857 for(l=0;l<nvertices;l++) nodes.
Push( geo->
NodePtr(l) );
918 buf.
Write(&shapetype,1);
928 int hasIntRule = this->
fIntRule ? 1 : 0;
929 buf.
Write(&hasIntRule,1);
935 int hasAssociatedGel = gel ? 1 : 0;
936 buf.
Write(&hasAssociatedGel);
956 buf.
Read(&shapetype,1);
958 int hasExternalShape;
959 buf.
Read(&hasExternalShape,1);
960 if(hasExternalShape == 1){
965 buf.
Read(&hasIntRule,1);
969 int hasAssociatedGel;
970 buf.
Read(&hasAssociatedGel,1);
971 if(hasAssociatedGel){
997 const int nshape = this->
NShapeF();
1022 int64_t numbersol = MeshSol.
Cols();
1024 int solVecSize = nstate;
1025 if(!ncon) solVecSize = 0;
1029 for (
int is = 0; is<numbersol; is++) {
1030 sol[is].
Resize(solVecSize);
1032 dsol[is].Redim(dphix.
Rows(), solVecSize);
1036 for(
int in=0; in<ncon; in++) {
1039 int dfvar = block.
Size(dfseq);
1040 int64_t pos = block.
Position(dfseq);
1041 for(
int jn=0; jn<dfvar; jn++) {
1042 for (int64_t is=0; is<numbersol; is++) {
1043 sol[is][iv%nstate] += (STATE)phi(iv/nstate,0)*MeshSol(pos+jn,is);
1044 for(d=0; d<dphix.
Rows(); d++){
1045 dsol[is](d,iv%nstate) += (STATE)dphix(d,iv/nstate)*MeshSol(pos+jn,is);
1071 const int integ =
Max( 2 * this->
Degree()+1, 0);
1115 if(extOrder > result) result = extOrder;
1138 tempMesh.InitializeBlock();
1146 PZError <<
"Error at " << __PRETTY_FUNCTION__ <<
" this->Material() == NULL\n";
1169 REAL SquareResidual = 0.;
1170 int intrulepoints = intrule->
NPoints();
1171 for(
int int_ind = 0; int_ind < intrulepoints; ++int_ind){
1172 intrule->
Point(int_ind,intpoint,weight);
1184 return SquareResidual;
1194 for(int64_t iel = 0; iel < nel; iel++){
1196 std::cout <<
"Evaluating square residual of element " << iel <<
"\n";
1205 error[iel] = elerror;
1209 std::cout <<
"Evaluation of square residual completed." <<
"\n";
int64_t NElements() const
Number of computational elements allocated.
bool Material_Is_PostProcessed(int matid)
Return a directive if the material id is being postprocessed.
virtual void GetOrder(TPZVec< int > &ord) const =0
Gets the order of the integration rule for each dimension of the master element.
TPZGeoMesh * Reference() const
Returns a pointer to the geometrical mesh associated.
virtual void Execute(const TPZVec< REAL > &x, TPZVec< TVar > &f, TPZFMatrix< TVar > &df)
Performs function computation.
Represents a graphical mesh used for post processing purposes. Post processing.
virtual int ClassId() const override
Define the class id associated with the class.
Contains the TPZGraphElTd class which implements the graphical discontinuous triangular element...
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ fabs
virtual void AccumulateIntegrationRule(int degree, TPZStack< REAL > &point, TPZStack< REAL > &weight)
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
REAL CenterPoint(int index) const
int Position(const int block_diagonal) const
Returns the position of first element block dependent on matrix diagonal.
virtual int NPoints() const =0
Returns number of points for the cubature rule related.
void IncrementElConnected()
Increment fNElConnected.
void AppendExternalShapeFunctions(TPZVec< REAL > &X, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Add extenal shape function into already computed phi and dphi discontinuous functions.
virtual int NShapeF() const override
Returns the shapes number of the element.
Implements computational element and a side. Computational Element.
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...
TPZGeoNode * NodePtr(int i) const
Returns a pointer to the ith node of the element.
void SolutionX(TPZVec< REAL > &x, TPZVec< STATE > &uh)
Computes the solution in function of a point in cartesian space.
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
To export a graphical one dimensional discontinuous element. Post processing.
virtual void InitMaterialData(TPZMaterialData &data)
Initialize a material data and its attributes based on element dimension, number of state variables a...
virtual void SetCreateFunctions(TPZCompMesh *mesh) override
Set create function in TPZCompMesh to create elements of this type.
Implements a vector class which allows to use external storage provided by the user. Utility.
int MaterialId() const
Returns the material index of the element.
virtual int NConnects() const override
Returns the number of connects.
void SetBlockMatrix(int row, int col, TPZFMatrix< TVar > &mat)
Sets the row,col block equal to matrix mat if row col was not specified by AddBlockNumbers, an error will be issued and exit.
virtual void resize(const int64_t newsize)
virtual REAL ComputeSquareResidual(TPZVec< REAL > &X, TPZVec< STATE > &sol, TPZFMatrix< STATE > &dsol)
Computes square of residual of the differential equation at one integration point.
REAL Coord(int i) const
Returns i-th coordinate of the current node.
void SetOrder(int order, int64_t index)
Set the order of the shapefunction associated with the connect.
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.
void AddBlockNumbers(int row, TPZVec< int > &colnumbers)
Will specify the sparsity pattern of row.
TPZFNMatrix< 660, REAL > dphi
values of the derivative of the shape functions over the master element
static REAL Distance(TPZVec< REAL > ¢el, TPZVec< REAL > ¢face)
Contains declaration of TPZCompEl class which defines the interface of a computational element...
bool fUseQsiEta
Variable to choose the qsi point or the X point in the calculus of the phis and dphis.
void Read(TPZStream &buf, void *context) override
Read the element data from a stream.
groups all classes dedicated to the computation of shape functions
virtual int64_t CreateMidSideConnect()
It creates new conect that it associates the degrees of freedom of the element and returns its index...
To export a graphical two-dimensional discontinuous element. Post processing.
To export a graphical three dimensional discontinuous element. Post processing.
virtual const TPZIntPoints & GetIntegrationRule() const override
Returns a reference to an integration rule suitable for integrating the interior of the element...
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
Compute shape functions based on master element in the classical FEM manner.
void degree(int root, int adj_num, int adj_row[], int adj[], int mask[], int deg[], int *iccsze, int ls[], int node_num)
void InternalPoint(TPZVec< REAL > &point)
Returns the center point.
virtual int Dimension() const =0
Returns the integrable dimension of the material.
Contains the TPZGraphEl class which implements the graphical one-, two- and three-dimensional element...
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
TPZFNMatrix< 9, REAL > jacinv
value of the inverse of the jacobian at the integration point
Implements the graphical element for a pyramid using a map to the cube element. Post processing...
void BuildTransferMatrix(TPZCompElDisc &coarsel, TPZTransfer< STATE > &transfer)
void SetExternalShapeFunction(TPZAutoPointer< TPZFunction< STATE > > externalShapes)
Define external shape functions which are stored in class attribute fExternalShape.
TPZGeoMesh * Mesh() const
Returns the mesh to which the element belongs.
virtual int NSides() const =0
Returns the number of connectivities of the element.
virtual const TPZIntPoints & GetIntegrationRule() const override=0
Returns a reference to an integration rule suitable for integrating the interior of the element...
virtual void Divide(TPZVec< TPZGeoEl *> &pv)
Divides the element and puts the resulting elements in the vector.
Contains the TPZGraphEl1d class which implements the graphical one dimensional element.
static TPZSavable * GetInstance(const int64_t &objId)
virtual int64_t NodeIndex(int i) const =0
Returns the index of the ith node the index is the location of the node in the nodevector of the mesh...
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
virtual void ComputeSolution(TPZVec< REAL > &qsi, TPZSolVec &sol, TPZGradSolVec &dsol, TPZFMatrix< REAL > &axes) override
Computes solution and its derivatives in the local coordinate qsi.
Contains the TPZTransfer class which implements a rectangular sparse block matrix.
void LoadReferences()
Map this grid in the geometric grid.
virtual void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
virtual void LoadElementReference()
Loads the geometric element reference.
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
int p
maximum polinomial order of the shape functions
virtual int GetSub(const int64_t sRow, const int64_t sCol, const int64_t rowSize, const int64_t colSize, TPZFMatrix< TVar > &Target) const
Gets submatrix storing it on Target.
void CreateGraphicalElement(TPZGraphMesh &grmesh, int dimension) override
Creates corresponding graphical element(s) if the dimension matches graphical elements are used to ge...
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
Abstract class defining integration rules. Numerical Integration.
void SetConnectIndex(int, int64_t index) override
Set the index i to node inode.
This abstract class defines the behaviour which each derived class needs to implement.
Contains declaration of TPZElementMatrix struct which associates an element matrix with the coeficien...
virtual REAL NormalizeConst()
Calculates the normalizing constant of the bases of the element.
virtual void CenterPoint(int side, TPZVec< REAL > &masscent) const =0
It returns the coordinates from the center of the side of the element in the element coordinate space...
virtual TPZIntPoints * CreateSideIntegrationRule(int side, int order)=0
Creates an integration rule for the topology of the corresponding side and able to integrate a polyno...
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
virtual TPZMaterial * Material() const
Identify the material object associated with the element.
void Write(TPZStream &buf, int withclassid) const override
Save the element data to a stream.
TPZCompElDisc()
Default constructor.
Implements a graphical element for a triangle mapped into de quadrilateral element. Post processing.
bool HasExternalShapeFunction()
Return whether element has external shape functions set to.
TPZCompEl * CreateCompEl(TPZGeoEl *gel, int64_t &index)
Create a computational element based on the geometric element.
int Zero() override
Makes Zero all the elements.
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
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...
virtual int IntegrationRuleOrder(int elPMaxOrder) const
Gets the order of the integration rule necessary to integrate an element with polinomial order p...
unsigned char Order() const
Access function to return the order associated with the connect.
void SetTensorialShape()
Set tensorial shape functions.
int64_t SequenceNumber() const
Returns the Sequence number of the connect object.
static void SetTensorialShape(TPZCompMesh *cmesh)
Sets tensorial shape functions for all Discontinuous elements in cmesh.
void Push(const T object)
Pushes a copy of the object on the stack.
void RemoveInterfaces()
Remove interfaces connected to this element.
void EqualLevelElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected elements which have equal level to the current element This method will not put...
void SetTotalOrderShape()
Set total order shape functions.
Contains the TPZGraphElT3d class which implements the graphical representation of a tetrahedra elemen...
Implements the graphical element for a prism using a degenerated cube element. Post processing...
TPZAutoPointer< TPZIntPoints > CreateIntegrationRule() const
virtual void Write(const bool val)
virtual void Print(std::ostream &out=std::cout) const
Print the information of the grid to an ostream.
int HasRowDefinition(int row)
Returns 1 if the row is defined (i.e. has column entries)
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...
const T & Max(const T &a, const T &b)
Returns the maximum value between a and b.
Implements the graphical representation of a tetrahedra element. Post processing. ...
int64_t Index() const
Returns the index of the element within the element vector of the mesh.
TVar Norm(const TPZFMatrix< TVar > &A)
Returns the norm of the matrix A.
void SetAllCreateFunctionsDiscontinuous()
#define DebugStop()
Returns a message to user put a breakpoint in.
Contains declaration of TPZInterfaceElement class which computes the contribution over an interface b...
virtual void SetOrder(TPZVec< int > &ord, int type=0)=0
Sets the order of the cubature rule.
void SetAllCreateFunctions(TPZCompEl &cel)
virtual void ExpandSolution()
Adapt the solution vector to new block dimensions.
Contains the TPZGraphElPrismMapped class which implements the graphical element for a prism using a d...
static void Convert2Axes(const TPZFMatrix< REAL > &dphi, const TPZFMatrix< REAL > &jacinv, TPZFMatrix< REAL > &dphidx)
convert a shapefunction derivative in xi-eta to a function derivative in axes
TPZCompMesh * Mesh() const
Return a pointer to the grid of the element.
Contains declaration of TPZConnect class which represents a set of shape functions associated with a ...
Free store vector implementation.
int ClassId() const override
Returns the unique identifier for reading/writing objects to streams.
void SetNState(int nstate)
Set the number of state variables.
int Dimension() const
Returns the dimension of the simulation.
TPZAutoPointer< TPZFunction< STATE > > fExternalShape
A pz function to allow the inclusion of extra shape functions which are defined externally.
void Jacobian(TPZVec< REAL > &qsi, TPZFMatrix< REAL > &jac, TPZFMatrix< REAL > &axes, REAL &detjac, TPZFMatrix< REAL > &jacinv) const
Compute a decomposition of the gradient of the mapping function, as a rotation matrix (Jacobian) and ...
int64_t fConnectIndex
It preserves index of connect associated to the element.
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
TPZCompEl * Reference() const
Return a pointer to the element referenced by the geometric element.
int64_t Rows() const
Returns number of rows.
void Shape(TPZVec< REAL > &pt, TPZVec< int > orders, TPZVec< TPZTransform< REAL > > &transvec, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
void SetNShape(int nshape)
Set the number of shape functions associated with the connect.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
Contains the TPZGraphElT class which implements the graphical triangular element. ...
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
const TPZBlock< STATE > & Block() const
Access the block structure of the solution vector.
Contains declaration of the TPZAutoPointer class which has Increment and Decrement actions are mutexe...
Contains the TPZGraphMesh class which represents a graphical mesh used for post processing purposes...
virtual int NFunctions() const
number of values returned by this function
virtual void AccumulateVertices(TPZStack< TPZGeoNode *> &nodes)
Accumulates the vertices of the agglomerated elements.
virtual int NConnectShapeF(int inod, int order) const override
Returns the number of shapefunctions associated with a connect.
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...
TPZIntPoints * fIntegrationRule
Integration rule established by the user.
TPZAdmChunkVector< TPZConnect > & ConnectVec()
Return a reference to the connect pointers vector.
Contains the TPZMaterialData class which implements an interface between TPZCompEl::CalcStiff and TPZ...
virtual int HasForcingFunction()
Directive that gives true if the material has a forcing function.
int MaxOrderExceptExternalShapes()
Returns the max order of interpolation excluding external shape order.
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
Contains declaration of TPZCompMesh class which is a repository for computational elements...
pzshape::TPZShapeDisc::MShapeType fShapefunctionType
Shape function type used by the element.
virtual TPZConnect & Connect(int i) const
Returns a pointer to the ith node.
void InterpolateSolution(TPZInterpolationSpace &coarsel)
Interpolates the solution into the degrees of freedom nodes from the degrees of freedom nodes from th...
int64_t ConnectIndex(int side=0) const override
Returns the connect index from the element.
int32_t Hash(std::string str)
Contains TPZMatrix<TVar>class, root matrix class.
TPZManVector< REAL, 3 > fCenterPoint
It keeps the interior point coordinations of the element.
virtual ~TPZCompElDisc()
Default destructor.
virtual int NNodes() const =0
Returns the number of nodes of the element.
Implements the interfaces for TPZCompElDisc, TPZInterfaceElement and TPZInterpolatedElement. Computational element.
virtual int NConnects() const =0
Returns the number of nodes of the element.
TPZFlopCounter pow(const TPZFlopCounter &orig, const TPZFlopCounter &xp)
Returns the power and increments the counter of the power.
void SetTensorialShapeFull()
Set tensorial shape functions with many derivatives.
int InsertMaterialObject(TPZMaterial *mat)
Insert a material object in the datastructure.
virtual void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
static void SetTotalOrderShape(TPZCompMesh *cmesh)
Set total order shape functions for all Discontinuous elements in cmesh.
virtual int MaxOrder() override
Returns the max order of interpolation.
virtual int Dimension() const =0
Returns the dimension of the element.
virtual void Print(std::ostream &out=std::cout) const override
Prints the features of the element.
REAL dist(TPZVec< T1 > &vec1, TPZVec< T1 > &vec2)
virtual void Shape(TPZVec< REAL > &qsi, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphidxi) override
Computes the shape function set at the point x. This method uses the order of interpolation of the el...
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
Implements a geometric node in the pz environment. Geometry.
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...
virtual REAL SideArea(int side)
Returns the area from the face.
virtual int GetMaxOrder() const
Returns the minimum order to integrate polinomials exactly for all implemented cubature rules...
void ResetReference()
Reset the element referenced by the geometric element to NULL.
Implements computational mesh. Computational Mesh.
int Size(const int block_diagonal) const
Returns block dimension.
TPZAdmChunkVector< TPZCompEl * > & ElementVec()
Returns a reference to the element pointers vector.
virtual void Print(std::ostream &out=std::cout) const
Prints element data.
void SetReference(TPZCompEl *elp)
Make the current element reference to the computational element.
Contains the TPZGraphElT2dMapped class which implements a graphical element for a triangle mapped int...
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.
virtual void SetDegree(int degree)
Assigns the degree of the element.
virtual int MaxOrder()
Returns the max order of interpolation.
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
virtual int Degree() const
Returns the degree of interpolation of the element.
Defines the interface for saving and reading data. Persistency.
int64_t NElements() const
Returns the number of elements of the vector.
REAL fConstC
Normalizing constant for shape functions.
Contains the TPZGraphEl1dd class which implements the graphical one dimensional discontinuous element...
void Divide(int64_t index, TPZVec< int64_t > &subindex, int interpolate=0) override
Divide the computational element.
virtual TPZIntPoints * Clone() const =0
Make a clone of the related cubature rule.
This class implements a discontinuous element (for use with discontinuous Galerkin). Computational Element.
virtual void ShapeX(TPZVec< REAL > &X, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
Implements rectangular matrix which extends a solution vector of the coarse mesh to a solution vector...
virtual int NInterfaces()
Returns the number of interfaces.
int fPreferredOrder
Preferred polynomial order.
int Dimension() const override
Returns dimension from the element.
Defines the interface of a computational element. Computational Element.
TPZSolVec sol
vector of the solutions at the integration point
virtual int NSubElements() const =0
Returns the number of subelements of the element independent of the fact whether the element has alr...
void SetTotalOrderShapeFull()
Set total order shape functions.
Contains the TPZGraphElQ3dd class which implements the graphical three dimensional discontinuous elem...
virtual void BuildCornerConnectList(std::set< int64_t > &connectindexes) const override
adds the connect indexes associated with base shape functions to the set
int64_t fIndex
Element index into mesh element vector.
TPZFMatrix< STATE > & Solution()
Access the solution vector.
REAL detjac
determinant of the jacobian
virtual int PolynomialOrder() const
Polynomial order of this function. In case of non-polynomial function it can be a reasonable approxim...
static void WritePointer(const TPZSavable *obj, TPZStream *stream)
virtual MElementType Type() override
Type of the element.
Implements an interface to register a class id and a restore function. Persistence.
virtual int SolveDirect(TPZFMatrix< TVar > &F, const DecomposeType dt, std::list< int64_t > &singular)
Solves the linear system using Direct methods.
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...
virtual void Point(int i, TPZVec< REAL > &pos, REAL &w) const =0
Returns i-th point at master element and related weight.
#define PZError
Defines the output device to error messages and the DebugStop() function.
TPZCompMesh * fMesh
Computational mesh to which the element belongs.
static REAL EvaluateSquareResidual2D(TPZInterpolationSpace *cel)
Compute the integral of the square residual over the element domain.
virtual void Print(std::ostream &out=std::cout) const
Prints mesh data.
virtual void Read(bool &val)
This class implements a reference counter mechanism to administer a dynamically allocated object...
TPZAutoPointer< TPZIntPoints > fIntRule