NeoPZ
pzcompelpostproc.h
Go to the documentation of this file.
1 
6 #ifndef PZCOMPELPOSTPROC_H
7 #define PZCOMPELPOSTPROC_H
8 
9 class TPZMaterialData;
10 
11 #include "pzreferredcompel.h"
12 #include "pzinterpolationspace.h"
13 #include "tpzautopointer.h"
14 #include "TPZMaterial.h"
15 #include "pzmaterialdata.h"
16 #include "pzelmat.h"
17 #include "pzstack.h"
18 #include "pzcmesh.h"
19 #include "pzquad.h"
20 #include <cmath>
21 #include "pzlog.h"
22 #include "pzpostprocmat.h"
23 #include "pzvec.h"
24 #include "pzreal.h"
25 #include "pzmatrix.h"
26 #include "pzfmatrix.h"
27 
28 #include "TPZShapeDisc.h"
29 
30 
31 #include "pzmultiphysicselement.h"
32 
33 #ifdef LOG4CXX
34 static LoggerPtr CompElPostProclogger(Logger::getLogger("pz.mesh.TPZCompElPostProc"));
35 #endif
36 
37 using namespace std;
38 
39 
45 template <class TCOMPEL >
46 class TPZCompElPostProc : public TPZReferredCompEl<TCOMPEL>
47 {
48 public:
49 
51 
52  virtual ~TPZCompElPostProc();
53 
54  TPZCompElPostProc(TPZCompMesh &mesh, TPZGeoEl *gel, int64_t &index);
55 
57 
63  const TPZCompElPostProc<TCOMPEL> &copy,
64  std::map<int64_t,int64_t> & gl2lcConMap,
65  std::map<int64_t,int64_t> & gl2lcElMap);
66 
68  void InitializeShapeFunctions();
69 
70  virtual TPZCompEl *Clone(TPZCompMesh &mesh) const override;
71 
79  virtual TPZCompEl *ClonePatchEl(TPZCompMesh &mesh,std::map<int64_t,int64_t> & gl2lcConMap,std::map<int64_t,int64_t>&gl2lcElMap) const override;
80 
85  virtual void Print(std::ostream & out = std::cout) const override
86  {
87  out << __PRETTY_FUNCTION__ << " calling print from superclass\n";
89  }
90 
91  void ComputeRequiredData(TPZMaterialData &data, TPZVec<REAL> &qsi) override;
92 
100  virtual void CalcResidual(TPZElementMatrix &ef) override;
101 
106  virtual void CalcStiff(TPZElementMatrix &ek, TPZElementMatrix &ef) override;
107 
109  bool dataequal(TPZMaterialData &d1,TPZMaterialData &d2);
110 
122  virtual void ComputeSolution(TPZVec<REAL> &qsi, TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphix,
123  const TPZFMatrix<REAL> &axes, TPZSolVec &sol, TPZGradSolVec &dsol) override;
124 
139  virtual void ComputeSolution(TPZVec<REAL> &qsi,
140  TPZVec<REAL> &normal,
141  TPZSolVec &leftsol, TPZGradSolVec &dleftsol,TPZFMatrix<REAL> &leftaxes,
142  TPZSolVec &rightsol, TPZGradSolVec &drightsol,TPZFMatrix<REAL> &rightaxes) override;
143 
144 
151  virtual void ComputeShape(TPZVec<REAL> &intpoint, TPZVec<REAL> &X, TPZFMatrix<REAL> &jacobian, TPZFMatrix<REAL> &axes,
152  REAL &detjac, TPZFMatrix<REAL> &jacinv, TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphi, TPZFMatrix<REAL> &dphidx) override;
153 
154 
155 public:
156  int ClassId() const override;
157 
159  void Write(TPZStream &buf, int withclassid) const override;
160 
162  void Read(TPZStream &buf, void *context) override;
163 
164 };
165 
166 template<class TCOMPEL>
169 }
170 
171 template<class TCOMPEL>
173 
174 }
175 
176 template<class TCOMPEL>
178 TPZReferredCompEl<TCOMPEL>(mesh, gel, index){
180 }
181 
182 template<class TCOMPEL>
184 TPZReferredCompEl<TCOMPEL>(mesh, copy) {
186 }
187 
188 template<class TCOMPEL>
190  const TPZCompElPostProc<TCOMPEL> &copy,
191  std::map<int64_t,int64_t> & gl2lcConMap,
192  std::map<int64_t,int64_t> & gl2lcElMap):
193 TPZReferredCompEl<TCOMPEL>(mesh,copy,gl2lcConMap,gl2lcElMap)
194 {
196 }
197 
198 template <class TCOMPEL>
200  return new TPZCompElPostProc<TCOMPEL> (mesh, *this);
201 }
202 
203 template <class TCOMPEL>
204 inline TPZCompEl * TPZCompElPostProc<TCOMPEL>::ClonePatchEl(TPZCompMesh &mesh,std::map<int64_t,int64_t> & gl2lcConMap,std::map<int64_t,int64_t>&gl2lcElMap)const{
205  return new TPZCompElPostProc<TCOMPEL> (mesh, *this, gl2lcConMap, gl2lcElMap);
206 }
207 
208 template <class TCOMPEL>
210  //TPZReferredCompEl<TCOMPEL>::fShapefunctionType = pzshape::TPZShapeDisc::ETensorial;//pzshape::TPZShapeDisc::EOrdemTotal;
211  // an orthogonal (or one closest possible to) polynomial function is very important
212  // here to ensure the L2 solution transfer matrix isn't ill-conditioned
213  //TPZReferredCompEl<TCOMPEL>::SetOrthogonalFunction(pzshape::TPZShapeDisc::ChebyshevWithoutScale);
214  // TPZReferredCompEl<TCOMPEL>::SetOrthogonalFunction(pzshape::TPZShapeDisc::LegendreWithoutScale);
215 }
216 
217 template <class TCOMPEL>
219  TPZVec<REAL> &qsi){
220  TCOMPEL::ComputeRequiredData(data, qsi);
221 }
222 
223 
224 
228 template <class TCOMPEL>
230  return Hash("TPZCompElPostProc") ^ TPZReferredCompEl<TCOMPEL>::ClassId() << 1;
231 }
232 
233 
237 template <class TCOMPEL>
238 inline void TPZCompElPostProc<TCOMPEL>::Write(TPZStream &buf, int withclassid) const
239 {
240  TCOMPEL::Write(buf,withclassid);
241 }
242 
246 template <class TCOMPEL>
247 inline void TPZCompElPostProc<TCOMPEL>::Read(TPZStream &buf, void *context)
248 {
249  TCOMPEL::Read(buf,context);
250 }
251 
252 
253 
254 
255 template <class TCOMPEL>
257 {
258  ef.Reset();
259 
260  this->InitializeElementMatrix(ef);
261 
263 
264  TPZInterpolationSpace * pIntSpRef = dynamic_cast<TPZInterpolationSpace *>(pCompElRef);
265 
266  TPZMultiphysicsElement *pMultiRef = dynamic_cast<TPZMultiphysicsElement *>(pCompElRef);
267 
268  TPZPostProcMat * pPostProcMat = dynamic_cast<TPZPostProcMat *>(this->Material());
269 
270  TPZMaterial * pMaterialRef = pCompElRef->Material();
271 
272 
273  if (this->NConnects() == 0) return;
274 
275  int64_t numeq = ef.fMat.Rows();
276  TPZFNMatrix<1,STATE> efTemp(numeq,1,0.);
277 
278  TPZMaterialData data, dataRef;
279  this->InitMaterialData(data);
280  if(pIntSpRef)
281  {
282  pIntSpRef->InitMaterialData(dataRef);
283  dataRef.fNeedsSol = true;
284  dataRef.p = pIntSpRef->MaxOrder();
285  }
286  data.p = this->MaxOrder();
287  int dim = this->Reference()->Dimension();
288  TPZManVector<REAL,3> intpoint(dim,0.);
289  TPZManVector<REAL,3> intpointRef(dim,0);
290  REAL weight = 0.;
291  REAL weightRef = 0;
292 
293  TPZIntPoints* pFIntegrationRule = &this->GetIntegrationRule();
294  if (!pFIntegrationRule) {
295  PZError << "Error at " << __PRETTY_FUNCTION__ << " Integration rule must be used from TPZCompEl. \n";
296  DebugStop();
297  }
298 
299  const TPZIntPoints &intrule = this->GetIntegrationRule();
300  const TPZIntPoints &intruleRef = pCompElRef->GetIntegrationRule();
301 
302  int intrulepoints = intrule.NPoints();
303  int intrulepointsRef = intruleRef.NPoints();
304  if(intrulepoints != intrulepointsRef)
305  {
306  PZError << "Error at " << __PRETTY_FUNCTION__ << " Referred CompEl with different number of integration points\n";
307  return;
308  }
309 
310  int nshape = this->NShapeF();
311  TPZFNMatrix<10,STATE> ekTemp(nshape, nshape, 0.);
312 
313  TPZManVector<int,10> varIndex;
314  pPostProcMat->GetPostProcessVarIndexList(varIndex);
315 
316  int stackedVarSize = pPostProcMat->NStateVariables();
317  TPZVec<STATE> Sol;
318 
319  for(int int_ind = 0; int_ind < intrulepoints; ++int_ind)
320  {
321  intrule. Point(int_ind,intpoint, weight);
322  intruleRef.Point(int_ind,intpointRef,weightRef);
323  this-> ComputeShape(intpoint, data.x, data.jacobian,
324  data.axes, data.detjac, data.jacinv,
325  data.phi, data.dphi, data.dphix);
326 
327  /*pIntSpRef ->ComputeShape(intpointRef, dataRef.x, dataRef.jacobian,
328  dataRef.axes, dataRef.detjac, dataRef.jacinv,
329  dataRef.phi, dataRef.dphix); */
330  dataRef.intLocPtIndex = int_ind;
331  if(pIntSpRef)
332  {
333  pIntSpRef->ComputeShape(intpointRef,dataRef);
334  pIntSpRef->ComputeRequiredData(dataRef, intpointRef);
335  }
336  if(pMultiRef)
337  {
338  pMultiRef->ComputeRequiredData(dataRef, intpointRef);
339  }
340  weight *= fabs(data.detjac);
341  weightRef *= fabs(dataRef.detjac);
342  data .intLocPtIndex = int_ind;
343  dataRef.intLocPtIndex = int_ind;
344  this->ComputeRequiredData(data, intpoint);
345 
346 // if(pIntSpRef)
347 // {
348 // if(!dataequal(data,dataRef)){
349 // PZError << "Error at " << __PRETTY_FUNCTION__ << " this and Referred CompEl TPZMaterialData(s) do not match\n";
350 // ef.Reset();
351 // return;
352 // }
353 // }
354  data.sol[0].Resize(stackedVarSize,0.);
355  int64_t index = 0;
356  // stacking the solutions to post process.
357 #ifdef LOG4CXX
358  if(CompElPostProclogger->isDebugEnabled())
359  {
360  std::stringstream sout;
361  sout << "Integration point " << int_ind << " x = " << dataRef.x << " GradSol = " << dataRef.dsol[0] ;
362  LOGPZ_DEBUG(CompElPostProclogger, sout.str())
363  }
364 #endif
365  int n_var_indexes = varIndex.NElements();
366  for(int var_ind = 0; var_ind < n_var_indexes; var_ind++)
367  {
368  int variableindex = varIndex[var_ind];
369  int nsolvars = pMaterialRef->NSolutionVariables(variableindex);
370  Sol.Resize(nsolvars);
371 
372  if (variableindex < 99) {
373  pMaterialRef->Solution(dataRef, variableindex, Sol);
374  }
375  else {
376  pCompElRef->Solution(intpointRef, variableindex, Sol);
377  }
378 
379 #ifdef LOG4CXX
380  if(CompElPostProclogger->isDebugEnabled())
381  {
382  std::stringstream sout;
383  std::string varname;
384  pPostProcMat->GetPostProcVarName(var_ind, varname);
385  sout << varname << " -value- " << Sol;
386  LOGPZ_DEBUG(CompElPostProclogger, sout.str())
387  }
388 #endif
389  for(int i = 0; i <nsolvars; i++) data.sol[0][index+i] = Sol[i];
390  index += nsolvars;
391  }
392 
393  pPostProcMat->Contribute(data,weight,ekTemp,efTemp);
394 
395  }//loop over integration points
396 
397  TPZFNMatrix<90,STATE> ekCopy(ekTemp);
398 
399  TPZFNMatrix<10,STATE> rhsTemp(nshape, 1, 0.);
400  for(int i_st = 0; i_st < stackedVarSize; i_st++)
401  {
402 
403  efTemp.GetSub(i_st*nshape, 0, nshape, 1, rhsTemp);
404 
405  TPZFNMatrix<9,STATE> rhsCopy(rhsTemp), result(nshape,1,0.);;
406 // int status = ekTemp.Solve_Cholesky(&(rhsTemp));
407  int status = ekTemp.Solve_LU(&(rhsTemp));
408  ekCopy.MultAdd(rhsTemp, rhsCopy, result, 1., -1.);
409  REAL invRes = Norm(result);
410  if(!status ){
411  PZError << "Error at " << __PRETTY_FUNCTION__ << " Unable to solve the transference linear system\n";
412  ef.Reset();
413  return;
414  }
415 
416  if(invRes > 1.e-7)
417  {
418  PZError << "Error at " << __PRETTY_FUNCTION__
419  << " Transference linear system solved with residual norm = "
420  << invRes << " at " << i_st << " export variable\n";
421  }
422  for(int i_sh = 0; i_sh < nshape; i_sh++)
423  ef.fMat(i_sh * stackedVarSize + i_st, 0) = rhsTemp(i_sh);
424  }
425 
426 #ifdef LOG4CXX2
427  {
428  std::stringstream sout;
429  sout << "Element index " << this->fIndex << std::endl;
430  ef.fMat.Print("Post Processed ",sout);
431  LOGPZ_DEBUG(CompElPostProclogger, sout.str())
432  }
433 #endif
434 
435 }
436 
437 template <class TCOMPEL>
439  PZError << "\nTPZCompElPostProc<TCOMPEL>::CalcStiff() Should never be called!!!\n";
440  return;
441 }
442 
443 template <class TCOMPEL>
445 {
446  const REAL SMALLNUMBER = 1.e-8;
447  int i;
448  if(d1.p!=d2.p)
449  {
450  DebugStop();
451  return 0;
452  }
453  REAL res = 0;
454  int dim = d1.x.NElements();
455  int64_t nshape = d1.phi.Rows();
456  int64_t nshape2 = d2.phi.Rows();
457  if(dim != d2.x.NElements() || nshape!= nshape2)
458  {
459  DebugStop();
460  return 0; // dimensions and number of integration points shall match
461  }
462 
463  for(i = 0; i < dim; i++)res += pow(d1.x[i]-d2.x[i],(REAL)2.0); // integration points must be at the same locations
464  if(res > SMALLNUMBER)
465  {
466  DebugStop();
467  return 0;
468  }
469  return 1;
470 }
471 
472 template <class TCOMPEL>
474  TPZFMatrix<REAL> &phi,
475  TPZFMatrix<REAL> &dphix,
476  const TPZFMatrix<REAL> &axes,
477  TPZSolVec &sol,
478  TPZGradSolVec &dsol){
479  TCOMPEL::ComputeSolution(qsi, phi, dphix, axes, sol, dsol);
480 }//method
481 
482 template <class TCOMPEL>
484  TPZVec<REAL> &normal,
485  TPZSolVec &leftsol, TPZGradSolVec &dleftsol, TPZFMatrix<REAL> &leftaxes,
486  TPZSolVec &rightsol, TPZGradSolVec &drightsol,TPZFMatrix<REAL> &rightaxes){
487  TCOMPEL::ComputeSolution(qsi, normal, leftsol, dleftsol, leftaxes, rightsol, drightsol, rightaxes);
488 }
489 
490 template <class TCOMPEL>
492  TPZFMatrix<REAL> &jacobian, TPZFMatrix<REAL> &axes,
493  REAL &detjac, TPZFMatrix<REAL> &jacinv,
495  TPZGeoEl * ref = this->Reference();
496  if (!ref){
497  PZError << "\nERROR AT " << __PRETTY_FUNCTION__ << " - this->Reference() == NULL\n";
498  return;
499  }//if
500  ref->Jacobian( intpoint, jacobian, axes, detjac , jacinv);
501 
502  ref->X(intpoint, X);
503  // this->Shape(intpoint,intpoint,phi,dphix);
504  this->Shape(intpoint,phi,dphi);
505  //this->Shape(intpoint,X,phi,dphix);
506 
507  // ///axes is identity in discontinuous elements
508  // axes.Resize(dphix.Rows(), dphix.Rows());
509  // axes.Identity();
510 }
511 
512 #endif
513 
514 
515 
516 
517 
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout)
Returns the solution associated with the var index based on the finite element approximation.
virtual void ComputeRequiredData(TPZVec< REAL > &point, TPZVec< TPZTransform<> > &trvec, TPZVec< TPZMaterialData > &datavec, TPZVec< int64_t > indices)
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
Definition: tfadfunc.h:140
virtual TPZCompEl * Clone(TPZCompMesh &mesh) const override
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
virtual int NPoints() const =0
Returns number of points for the cubature rule related.
int Solve_LU(TPZFMatrix< TVar > *B, std::list< int64_t > &singular)
Solves the linear system using LU method .
Definition: pzmatrix.h:900
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)
Initialize a material data and its attributes based on element dimension, number of state variables a...
int ClassId() const override
bool dataequal(TPZMaterialData &d1, TPZMaterialData &d2)
Compare some fields of 2 TPZMaterialData and return true if these do match.
virtual TPZCompEl * ClonePatchEl(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...
TPZFNMatrix< 660, REAL > dphi
values of the derivative of the shape functions over the master element
TPZFNMatrix< 1000, STATE > fMat
Pointer to a blocked matrix object.
Definition: pzelmat.h:41
Templated vector implementation.
void ComputeRequiredData(TPZMaterialData &data, TPZVec< REAL > &qsi) override
Contains declaration of TPZInterpolationSpace class which implements the interface for interpolated c...
void InitializeShapeFunctions()
Initializes the shape function type in order to allow non ill-conditioned L2 Transfer matrix...
TPZGradSolVec dsol
vector of the derivatives of the solution at the integration point
Contains the declaration of the TPZMultiphysicsElement class. This class is abstract.
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
It computes a contribution to the stiffness matrix and load vector at one integration point...
TPZFNMatrix< 9, REAL > jacinv
value of the inverse of the jacobian at the integration point
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...
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
Definition: pzmanvector.h:426
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)
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.
Definition: pzmatrix.cpp:602
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
Abstract class defining integration rules. Numerical Integration.
Definition: tpzintpoints.h:19
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
Contains declaration of TPZElementMatrix struct which associates an element matrix with the coeficien...
virtual TPZMaterial * Material() const
Identify the material object associated with the element.
Definition: pzcompel.cpp:959
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...
Definition: pzvec.h:373
TPZCompElPostProc()
virtual ~TPZCompElPostProc()
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.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
void GetPostProcVarName(int64_t index, std::string &varname)
Return the name of the ith postproc variable.
TVar Norm(const TPZFMatrix< TVar > &A)
Returns the norm of the matrix A.
Contains TPZMatrixclass which implements full matrix (using column major representation).
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
Definition: pzlog.h:87
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 ...
Definition: pzgeoel.cpp:1144
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 benefit...
int64_t Rows() const
Returns number of rows.
Definition: pzmatrix.h:803
void Shape(TPZVec< REAL > &pt, TPZVec< int > orders, TPZVec< TPZTransform< REAL > > &transvec, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
string res
Definition: test.py:151
virtual void CalcResidual(TPZElementMatrix &ef) override
The CalcResidual reimplementation is in charge of extracting the data from the referred compEl at the...
Contains declaration of the TPZAutoPointer class which has Increment and Decrement actions are mutexe...
Contains the TPZMaterialData class which implements an interface between TPZCompEl::CalcStiff and TPZ...
void Write(TPZStream &buf, int withclassid) const override
Save the element data to a stream.
Contains declaration of TPZCompMesh class which is a repository for computational elements...
void Read(TPZStream &buf, void *context) override
Read the element data from a stream.
int intLocPtIndex
Index of the current integration point being evaluated.
A simple stack.
int32_t Hash(std::string str)
Definition: TPZHash.cpp:10
Contains TPZMatrix<TVar>class, root matrix class.
void GetPostProcessVarIndexList(TPZVec< int > &varIndexList)
Returns a vector with all the variable indexes requested for post processing and an the total number ...
This class associates an element matrix with the coeficients of its contribution in the global stiffn...
Definition: pzelmat.h:30
This class implements the TPZCompEl structure to enable copying the solution of the referred compEl a...
Implements the interfaces for TPZCompElDisc, TPZInterfaceElement and TPZInterpolatedElement. Computational element.
virtual void Print(std::ostream &out=std::cout) const override
Prints element data.
TPZFlopCounter pow(const TPZFlopCounter &orig, const TPZFlopCounter &xp)
Returns the power and increments the counter of the power.
Definition: pzreal.h:487
virtual void Print(std::ostream &out=std::cout) const override
Prints element data.
virtual int NSolutionVariables(int var)
Returns the number of variables associated with the variable indexed by var.
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...
void Reset(TPZCompMesh *mesh=NULL, MType type=Unknown)
Reset the data structure.
Definition: pzelmat.h:59
Template to generate computational elements. Computational Element.
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
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...
Definition: pzcompel.cpp:421
Contains the declaration of the shape function discontinuous.
virtual void MultAdd(const TPZFMatrix< TVar > &x, const TPZFMatrix< TVar > &y, TPZFMatrix< TVar > &z, const TVar alpha=1., const TVar beta=0., const int opt=0) const override
It computes z = beta * y + alpha * opt(this)*x but z and x can not overlap in memory.
Definition: pzfmatrix.cpp:757
int ClassId() const override
write the element data to a stream
virtual void Print(std::ostream &out) const
Definition: pzmatrix.h:253
virtual int MaxOrder()
Returns the max order of interpolation.
virtual int NStateVariables() const override
returns the number of state variables associated with the material
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
int64_t NElements() const
Returns the number of elements of the vector.
Definition: pzvec.h:190
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
virtual const TPZIntPoints & GetIntegrationRule() const
Definition: pzcompel.h:609
Contains declaration of TPZReferredCompEl class which generates computational elements.
TPZCompEl * ReferredElement()
Returns referred element of this.
virtual void ComputeRequiredData(TPZMaterialData &data, TPZVec< REAL > &qsi)
Compute and fill data with requested attributes.
Defines the interface of a computational element. Computational Element.
Definition: pzcompel.h:59
TPZSolVec sol
vector of the solutions at the integration point
Definition: pzpostprocmat.h:51
REAL detjac
determinant of the jacobian
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...
Definition: pzfmatrix.h:716
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.
Definition: pzerror.h:15