NeoPZ
pzmultiphysicselement.cpp
Go to the documentation of this file.
1 //
2 // pzmultiphysicselement.cpp
3 // PZ
4 //
5 // Created by Philippe Devloo on 5/25/12.
6 // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 //
8 
9 #include <iostream>
10 #include "pzmultiphysicselement.h"
12 #include "TPZMaterial.h"
13 #include "pzbndcond.h"
14 #include "pzlog.h"
15 #include "pzinterpolationspace.h"
16 #include "pzcompelwithmem.h"
17 
18 #ifdef LOG4CXX
19 static LoggerPtr logger(Logger::getLogger("pz.mesh.TPZMultiPhysicsElement"));
20 #endif
21 
23 {
24 
25 }
26 
28 {
29  //nao verifica-se caso o elemento de contorno
30  //eh maior em tamanho que o interface associado
31  //caso AdjustBoundaryElement nao for aplicado
32  //a malha eh criada consistentemente
33  TPZGeoEl *ref = Reference();
34  int nsides = ref->NSides();
35  int InterfaceDimension = Mesh()->Dimension() - 1;
36  int side;
37  nsides--;//last face
38  for(side=nsides;side>=0;side--) {
39  if(ref->SideDimension(side) != InterfaceDimension) continue;
40  TPZCompElSide thisside(this,side);
41  if(this->ExistsInterface(side)) {
42  // cout << "TPZCompElDisc::CreateInterface inconsistent: interface already exists\n";
43  continue;
44  }
45  TPZStack<TPZCompElSide> highlist;
46  thisside.HigherLevelElementList(highlist,0,1);
47  //a interface se cria uma vez so quando existem ambos
48  //elementos esquerdo e direito (compu tacionais)
49  if(!highlist.NElements()) {
50  this->CreateInterface(side);//s�tem iguais ou grande => pode criar a interface
51  } else {
52  int64_t ns = highlist.NElements();
53  int64_t is;
54  for(is=0; is<ns; is++) {//existem pequenos ligados ao lado atual
55  const int higheldim = highlist[is].Reference().Dimension();
56  if(higheldim != InterfaceDimension) continue;
57  // TPZCompElDisc *del = dynamic_cast<TPZCompElDisc *> (highlist[is].Element());
58  // if(!del) continue;
59 
60  TPZCompEl *del = highlist[is].Element();
61  if(!del) continue;
62 
63  TPZCompElSide delside( del, highlist[is].Side() );
64  TPZMultiphysicsElement * delSp = dynamic_cast<TPZMultiphysicsElement *>(del);
65  if (!delSp){
66  PZError << "\nERROR AT " << __PRETTY_FUNCTION__ << " - CASE NOT AVAILABLE\n";
67  return;
68  }
69  if ( delSp->ExistsInterface(highlist[is].Side()) ) {
70  // cout << "TPZCompElDisc::CreateInterface inconsistent: interface already exists\n";
71  }
72  else {
73  delSp->CreateInterface(highlist[is].Side());
74  }
75  }
76  }
77  }
78 }
79 
81  DebugStop();
82  return 0;
83 }
84 
86 {
87  // LOGPZ_INFO(logger, "Entering CreateInterface");
88  TPZMultiphysicsInterfaceElement * newcreatedinterface = NULL;
89 
90  TPZGeoEl *ref = Reference();
91  if(!ref) {
92  LOGPZ_WARN(logger, "Exiting CreateInterface Null reference reached - NULL interface returned");
93  return newcreatedinterface;
94  }
95 
96  TPZCompElSide thisside(this,side);
98  list.Resize(0);
99  thisside.EqualLevelElementList(list,0,0);//retorna distinto ao atual ou nulo
100  int64_t size = list.NElements();
101  //espera-se ter os elementos computacionais esquerdo e direito
102  //ja criados antes de criar o elemento interface
103  // try to create an interface element between myself and an equal sized neighbour
104  for (int64_t is=0; is<size; is++)
105  {
106  //Interface has the same material of the neighbour with lesser dimension.
107  //It makes the interface have the same material of boundary conditions (TPZCompElDisc with interface dimension)
108  int matid;
109  int thisdim = this->Dimension();
110  int neighbourdim = list[is].Element()->Dimension();
111 
112  if(thisdim != neighbourdim)
113  {
114  if (thisdim < neighbourdim)
115  {
116  // return the material id of boundary condition IF the associated material is derived from bndcond
117  TPZMaterial *mat = this->Material();
118  TPZBndCond *bnd = dynamic_cast<TPZBndCond *>(mat);
119  if(bnd)
120  {
121  matid = this->Material()->Id();
122  }
123  else
124  {
125  matid = this->Mesh()->Reference()->InterfaceMaterial(this->Reference()->MaterialId(),list[0].Element()->Reference()->MaterialId());
126  continue;
127  }
128  }
129  else
130  {
131  TPZMaterial *mat = list[is].Element()->Material();
132  TPZBndCond *bnd = dynamic_cast<TPZBndCond *>(mat);
133  if (bnd) {
134  matid = bnd->Id();
135  }
136  else {
137  matid = this->Mesh()->Reference()->InterfaceMaterial(this->Reference()->MaterialId(), list[0].Element()->Reference()->MaterialId());
138  continue;
139  }
140  }
141  }else
142  {
143  matid = this->Mesh()->Reference()->InterfaceMaterial(this->Reference()->MaterialId(), list[0].Element()->Reference()->MaterialId());
144  if(matid == GMESHNOMATERIAL)
145  {
146  continue;
147  }
148  }
149 
150  int64_t index;
151 
152 
153  TPZGeoEl *gel = ref->CreateBCGeoEl(side,matid); //isto acertou as vizinhanas da interface geometrica com o atual
154  if(!gel){
155  DebugStop();
156 #ifdef LOG4CXX
157  if (logger->isDebugEnabled())
158  {
159  std::stringstream sout;
160  sout << "CreateBCGeoEl devolveu zero!@@@@";
161  LOGPZ_DEBUG(logger,sout.str());
162  }
163 #endif
164  }
165  bool withmem = fMesh->ApproxSpace().NeedsMemory();
166  if(Dimension() > list[is].Reference().Dimension()) {
167  //o de volume eh o direito caso um deles seja BC
168  //a normal aponta para fora do contorno
169  TPZCompElSide thiscompelside(this, thisside.Side());
170  TPZCompElSide neighcompelside(list[is]);
171  if (!withmem) {
172  newcreatedinterface = new TPZMultiphysicsInterfaceElement(*fMesh,gel,index,thiscompelside,neighcompelside);
173  }
174  else
175  {
176  newcreatedinterface = new TPZCompElWithMem<TPZMultiphysicsInterfaceElement>(*fMesh,gel,index,thiscompelside,neighcompelside);
177  }
178  } else {
179  //caso contrario ou caso ambos sejam de volume
180  TPZCompElSide thiscompelside(this, thisside.Side());
181  TPZCompElSide neighcompelside(list[is]);
182  if (!withmem) {
183  newcreatedinterface = new TPZMultiphysicsInterfaceElement(*fMesh,gel,index,neighcompelside,thiscompelside);
184  }
185  else
186  {
187  newcreatedinterface = new TPZCompElWithMem<TPZMultiphysicsInterfaceElement>(*fMesh,gel,index,neighcompelside,thiscompelside);
188  }
189  }
190 
191 
192 
193  return newcreatedinterface;
194  }
195 
196  //If there is no equal or lower level element, we try the lower elements.
197  //Higher elements will not be considered by this method. In that case the interface must be created by the neighbour.
198  TPZCompElSide lower = thisside.LowerLevelElementList(0);
199  if(lower.Exists()){
200  //Interface has the same material of the neighbour with lesser dimension.
201  //It makes the interface has the same material of boundary conditions (TPZCompElDisc with interface dimension)
202  int matid = GMESHNOMATERIAL;
203  int thisdim = this->Dimension();
204  int neighbourdim = lower.Element()->Dimension();
205  matid = this->Mesh()->Reference()->InterfaceMaterial(this->Material()->Id(), lower.Element()->Material()->Id() );
206 
207  if (matid == GMESHNOMATERIAL && thisdim == neighbourdim){
208  // matid = this->Material()->Id();
209  //break;
210  }
211  else if(matid == GMESHNOMATERIAL && thisdim != neighbourdim)
212  {
213  if (thisdim < neighbourdim)
214  {
215  // return the material id of boundary condition IF the associated material is derived from bndcond
216  TPZMaterial *mat = this->Material();
217  TPZBndCond *bnd = dynamic_cast<TPZBndCond *>(mat);
218  if(bnd)
219  {
220  matid = this->Material()->Id();
221  }
222  else {
223  //continue;
224  }
225  }
226  else
227  {
228  TPZMaterial *mat = lower.Element()->Material();
229  TPZBndCond *bnd = dynamic_cast<TPZBndCond *>(mat);
230  if (bnd) {
231  matid = bnd->Id();
232  }
233  else {
234  //continue;
235  }
236  }
237  }
238 
239  // return zero
240  if(matid == GMESHNOMATERIAL)
241  {
242  return newcreatedinterface;
243  }
244 
245  TPZCompEl *lowcel = lower.Element();
246  //int lowside = lower.Side();
247  //existem esquerdo e direito: this e lower
248  TPZGeoEl *gel = ref->CreateBCGeoEl(side,matid);
249  int64_t index;
250 
251  bool withmem = fMesh->ApproxSpace().NeedsMemory();
252 
253  if(Dimension() > lowcel->Dimension()){
254  //para que o elemento esquerdo seja de volume
255  TPZCompElSide thiscompelside(this, thisside.Side());
256  TPZCompElSide lowcelcompelside(lower);
257  if (!withmem) {
258  newcreatedinterface = new TPZMultiphysicsInterfaceElement(*fMesh,gel,index,thiscompelside,lowcelcompelside);
259  }
260  else
261  {
262  newcreatedinterface = new TPZCompElWithMem<TPZMultiphysicsInterfaceElement>(*fMesh,gel,index,thiscompelside,lowcelcompelside);
263  }
264  } else {
265  TPZCompElSide thiscompelside(this, thisside.Side());
266  TPZCompElSide lowcelcompelside(lower);
267 #ifdef LOG4CXX_KEEP
268  if (logger->isDebugEnabled())
269  {
270  std::stringstream sout;
271  sout << __PRETTY_FUNCTION__ << " left element";
272  sout << lowcelcompelside << thiscompelside;
273  sout << "Left Element ";
274  lowcelcompelside.Element()->Print(sout);
275  sout << "Right Element ";
276  thiscompelside.Element()->Print(sout);
277  LOGPZ_DEBUG(logger,sout.str())
278  }
279 #endif
280  if (!withmem)
281  {
282  newcreatedinterface = new TPZMultiphysicsInterfaceElement(*fMesh,gel,index,lowcelcompelside,thiscompelside);
283  }
284  else
285  {
286  newcreatedinterface = new TPZCompElWithMem<TPZMultiphysicsInterfaceElement>(*fMesh,gel,index,lowcelcompelside,thiscompelside);
287  }
288  }
289 
290 
291  return newcreatedinterface;
292  }
293  return newcreatedinterface;
294 }
295 
297 
298  TPZGeoElSide geosd(Reference(),side);
299  TPZGeoElSide neighside = geosd.Neighbour();
300  while(neighside.Element() && neighside.Element() != geosd.Element()){
301  TPZCompElSide neighcompside = neighside.Reference();
302  neighside = neighside.Neighbour();
303  TPZCompEl *cel = neighcompside.Element();
304  if (!cel) {
305  continue;
306  }
308  if (mfintel) {
309  TPZCompElSide left = mfintel->Left();
310  TPZCompElSide right = mfintel->Right();
311  if(left.Element() == this || right.Element() == this)
312  {
313  return true;
314  }
315  }
316  }
317  return false;
318 }
319 
321 
322  int nsides = Reference()->NSides();
323  if (!this->Material()){
324  std::stringstream mess;
325  mess << __PRETTY_FUNCTION__ << " - this->Material() == NULL, I can't RemoveInterfaces()";
326  PZError << mess.str() << std::endl;
327  LOGPZ_ERROR(logger, mess.str());
328  return;
329  }
330  int InterfaceDimension = this->Material()->Dimension() - 1;
331  int is;
332  TPZStack<TPZCompElSide> list,equal;
333  for(is=0;is<nsides;is++){
334  TPZCompElSide thisside(this,is);
335  if(thisside.Reference().Dimension() != InterfaceDimension) continue;
336  // procurar na lista de elementos iguais
337  list.Resize(0);// o lado atual �uma face
338  //thisside.EqualLevelElementList(list,0,0);// monta a lista de elementos iguais
339  RemoveInterface(is);// chame remove interface do elemento atual (para o side atual)
340  thisside.HigherLevelElementList(list,0,0);// procurar na lista de elementos menores (todos)
341  int64_t size = list.NElements(),i; // 'isto pode incluir elementos interfaces'
342  //tirando os elementos de interface da lista
343  for(i=0;i<size;i++){
344  if(list[i].Element()->Type() == EInterface) {
345  LOGPZ_DEBUG(logger, "Removing interface element from the list of higher level elements");
346  //This need to be done because otherwise list could be invalidated when an interface is removed.
347  list[i] = TPZCompElSide();//tirando interface
348  }
349  }
350  for(i=0;i<size;i++){// percorre os elementos menores
351  if(!list[i].Element()) continue;
352  TPZGeoElSide geolist = list[i].Reference();//TESTE
353  if(geolist.Dimension() != InterfaceDimension) continue;
354  equal.Resize(0);// para cada elemento menor e' preciso verificar a dimensao,
355  list[i].EqualLevelElementList(equal,0,0);//montar a lista de elementos iguais (todos)
356  equal.Push(list[i]);//n� �incorporado no m�odo anterior
357  int neq = equal.NElements(),k=-1;
358  while(++k < neq) if(equal[k].Element()->Type() != EInterface) break;//procurando elemento descont�uo cujo
359  if(!neq || k == neq){ //lado faz parte da parti� do lado side do this
360  LOGPZ_FATAL(logger, " Inconsistency of data");
361  DebugStop();//elemento descont�uo n� achado: ERRO
362  }// chame removeinterface do elemento menor
363 
364  TPZMultiphysicsElement * equalkSp = dynamic_cast<TPZMultiphysicsElement*>(equal[k].Element());
365  if (!equalkSp){
366  PZError << "\nERROR AT " << __PRETTY_FUNCTION__ << " - CASE NOT AVAILABLE\n";
367  return;
368  }
369  equalkSp->RemoveInterface(equal[k].Side());
370  }
371  }
372 
373 }
374 
376 
378  list.Resize(0);
379  TPZCompElSide thisside(this,side);
380  thisside.EqualLevelElementList(list,0,0);// monta a lista de elementos iguais
381  int64_t size = list.NElements(), i=-1;
382  while(++i < size) if(list[i].Element()->Type() == EInterface) break;// procura aquele que e derivado de TPZInterfaceEl
383  if(!size || i == size){
384 #ifdef LOG4CXX
385  if (logger->isDebugEnabled())
386  {
387  std::stringstream sout;
388  sout << __PRETTY_FUNCTION__ << " no interface element found\n";
389  Print(sout);
390  LOGPZ_DEBUG(logger,sout.str())
391  }
392 #endif
393  return;// nada a ser feito
394  }
395  // aqui existe a interface
396  TPZCompEl *cel = list[i].Element();
397 #ifdef LOG4CXX
398  TPZGeoEl *gel = cel->Reference();
399  if (logger->isDebugEnabled())
400  {
401  std::stringstream sout;
402  sout << __PRETTY_FUNCTION__ << " element index " << Index() << " side " << std::endl;
403  sout << "geometric element reference count " << gel->NumInterfaces();
404  LOGPZ_DEBUG(logger,sout.str())
405  }
406 #endif
407  delete cel;
408 }
409 
411 {
412  int64_t nmeshes = NMeshes();
413  int64_t nindices = indices.size();
414  if(nindices>0){
415  for (int64_t iel = 0; iel<nindices; iel++) {
416  int64_t indicel = indices.operator[](iel);
417  TPZCompEl *cel = Element(indicel);
418  TPZInterpolationSpace *intel = dynamic_cast<TPZInterpolationSpace *>(cel);
419  if (!intel) {
420  continue;
421  }
422  TPZGeoEl *gel = intel->Reference();
423  TPZManVector<REAL> locpt(gel->Dimension());
424  trvec[indicel].Apply(point, locpt);
425  datavec[indicel].intGlobPtIndex = -1;
426  intel->ComputeRequiredData(datavec[indicel], locpt);
427  }
428  }else{
429  for (int64_t iel = 0; iel<nmeshes; iel++) {
430  TPZCompEl *cel = Element(iel);
431  TPZInterpolationSpace *intel = dynamic_cast<TPZInterpolationSpace *>(cel);
432  if (!intel) {
433  continue;
434  }
435  TPZGeoEl *gel = intel->Reference();
436  TPZManVector<REAL> locpt(gel->Dimension());
437  trvec[iel].Apply(point, locpt);
438  datavec[iel].intGlobPtIndex = -1;
439  intel->ComputeRequiredData(datavec[iel], locpt);
440  }
441  }
442 }
443 
444 
446 {
447  int nmeshes = this->NMeshes();
448  int icon = 0;
449  int nload = this->Mesh()->Solution().Cols();
450  for (int imesh = 0; imesh < nmeshes; imesh++) {
451  TPZCompEl *cel = this->ReferredElement(imesh);
452  if (!cel) {
453  continue;
454  }
455  if(!this->IsActiveApproxSpaces(imesh)){
456  continue;
457  }
458  int ncon = cel->NConnects();
459  for (int iconloc = 0; iconloc < ncon; iconloc++, icon++) {
460  TPZConnect &con = this->Connect(icon);
461  TPZConnect &conloc = cel->Connect(iconloc);
462  int64_t seq = con.SequenceNumber();
463  int64_t seqloc = conloc.SequenceNumber();
464  int blsz = this->Mesh()->Block().Size(seq);
465 
466 #ifdef PZDEBUG
467  int blszloc = cel->Mesh()->Block().Size(seqloc);
468  if (blsz != blszloc) {
469  DebugStop();
470  }
471 #endif
472  int pos = this->Mesh()->Block().Position(seq);
473  int posloc = cel->Mesh()->Block().Position(seqloc);
474  for (int ibl = 0; ibl < blsz; ibl++) {
475  for (int iload = 0; iload < nload; iload++) {
476  cel->Mesh()->Solution()(posloc+ibl,iload) = this->Mesh()->Solution()(pos+ibl,iload);
477  }
478 
479  }
480  }
481  }
482 }
483 
485  TPZVec<REAL> &errors, bool store_errors){
486 
487  DebugStop(); // Should never enter here
488 
489 
490 }//method
491 
493  TPZVec<STATE> &errors, bool store_errors)
494 {
495  DebugStop();
496 }
497 
TPZGeoMesh * Reference() const
Returns a pointer to the geometrical mesh associated.
Definition: pzcmesh.h:209
virtual void ComputeRequiredData(TPZVec< REAL > &point, TPZVec< TPZTransform<> > &trvec, TPZVec< TPZMaterialData > &datavec, TPZVec< int64_t > indices)
int Position(const int block_diagonal) const
Returns the position of first element block dependent on matrix diagonal.
Definition: pzblock.h:177
TPZCompElSide LowerLevelElementList(int onlyinterpolated)
Returns all connected elements which have level lower to the current element.
Definition: pzcompel.cpp:824
Implements computational element and a side. Computational Element.
Definition: pzcompel.h:632
Represents a set of shape functions associated with a computational element/side. Computational Eleme...
Definition: pzconnect.h:30
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.
virtual MElementType Type()
Return the type of the element.
Definition: pzcompel.cpp:195
TPZCompElSide Left() const
access function to the left element
TPZMultiphysicsInterfaceElement * CreateInterface(int side)
Contains the declaration of the TPZCompElWithMem class, it is as TPZCompEl with enable material memor...
virtual TPZCompEl * Element(int64_t elindex)=0
TPZGeoElSide Reference() const
Reference to the geometric element.
Definition: pzcompel.cpp:748
virtual int ComputeIntegrationOrder() const override
virtual int Dimension() const =0
Dimension of the element.
virtual int64_t NMeshes()=0
Contains declaration of TPZInterpolationSpace class which implements the interface for interpolated c...
virtual int Dimension() const =0
Returns the integrable dimension of the material.
Contains the declaration of the TPZMultiphysicsElement class. This class is abstract.
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
Definition: pzgeoelside.h:83
REAL val(STATE &number)
Returns value of the variable.
Definition: pzartdiff.h:23
#define LOGPZ_WARN(A, B)
Define log for warnings.
Definition: pzlog.h:91
TPZGeoElSide Neighbour() const
Definition: pzgeoel.h:754
virtual void EvaluateError(std::function< void(const TPZVec< REAL > &loc, TPZVec< STATE > &val, TPZFMatrix< STATE > &deriv)> func, TPZVec< REAL > &errors, bool store_error) override
Performs an error estimate on the elemen.
virtual int NSides() const =0
Returns the number of connectivities of the element.
virtual int SideDimension(int side) const =0
Return the dimension of side.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
Definition: pzmanvector.h:426
#define LOGPZ_FATAL(A, B)
Define log for fatal errors (cout)
Definition: pzlog.h:95
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
virtual TPZMaterial * Material() const
Identify the material object associated with the element.
Definition: pzcompel.cpp:959
void HigherLevelElementList(TPZStack< TPZCompElSide > &elsidevec, int onlyinterpolated, int removeduplicates)
Returns all connected elements which have level higher to the current element.
Definition: pzcompel.cpp:761
int64_t size() const
Returns the number of elements of the vector.
Definition: pzvec.h:196
TPZCreateApproximationSpace & ApproxSpace()
Definition: pzcmesh.h:498
int64_t SequenceNumber() const
Returns the Sequence number of the connect object.
Definition: pzconnect.h:158
void Push(const T object)
Pushes a copy of the object on the stack.
Definition: pzstack.h:80
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...
Definition: pzcompel.cpp:771
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
#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
This class defines the boundary condition for TPZMaterial objects.
Definition: pzbndcond.h:29
TPZCompMesh * Mesh() const
Return a pointer to the grid of the element.
Definition: pzcompel.cpp:288
int Dimension() const
Returns the dimension of the simulation.
Definition: pzcmesh.h:148
virtual TPZCompEl * ReferredElement(int64_t mesh)=0
Contains the declaration of multiphysic interface class.
int NumInterfaces()
Returns number of TPZInterfaceElement pointing to this.
Definition: pzgeoel.h:94
TPZCompEl * Reference() const
Return a pointer to the element referenced by the geometric element.
Definition: pzgeoel.h:750
TPZMultiphysicsElement()
Default constructor.
virtual TPZGeoEl * CreateBCGeoEl(int side, int bc)=0
Method which creates a geometric element on the side of an existing element.
This class implements the TPZCompEl structure to enable material memory feature. It should be instan...
const TPZBlock< STATE > & Block() const
Access the block structure of the solution vector.
Definition: pzcmesh.h:213
int Exists() const
Verifies if the object is non null (initialized)
Definition: pzcompel.h:697
int64_t Index() const
Returns element index of the mesh fELementVec list.
Definition: pzcompel.h:821
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
Definition: pzlog.h:93
virtual TPZConnect & Connect(int i) const
Returns a pointer to the ith node.
Definition: pzcompel.cpp:298
Implements the interfaces for TPZCompElDisc, TPZInterfaceElement and TPZInterpolatedElement. Computational element.
virtual int NConnects() const =0
Returns the number of nodes of the element.
TPZGeoEl * Element() const
Definition: pzgeoelside.h:162
virtual int Dimension() const =0
Returns the dimension of the element.
TPZCompEl * Element() const
Gives a pointer to the reference computational element.
Definition: pzcompel.h:675
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
Definition: pzcompel.cpp:1137
TPZCompElSide Reference() const
Returns a pointer to the elementside referenced by the geometric elementside.
int Dimension() const
the dimension associated with the element/side
Computes the contribution over an interface between two discontinuous elements. Computational Element...
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
int Size(const int block_diagonal) const
Returns block dimension.
Definition: pzblock.h:171
virtual void Print(std::ostream &out=std::cout) const
Prints element data.
Definition: pzcompel.cpp:322
int Id() const
Definition: TPZMaterial.h:170
int Side() const
Returns the side index.
Definition: pzcompel.h:688
int64_t Cols() const
Returns number of cols.
Definition: pzmatrix.h:809
int InterfaceMaterial(int leftmaterial, int rightmaterial)
Returns the interface material associated to left and right element materials. If no interface materi...
Definition: pzgmesh.cpp:1548
int64_t NElements() const
Returns the number of elements of the vector.
Definition: pzvec.h:190
#define GMESHNOMATERIAL
Identifier indicating the no material is associated.
Definition: pzgmesh.h:24
Implements an affine transformation between points in parameter space. Topology Utility.
Definition: pzmganalysis.h:14
TPZCompElSide Right() const
Access function to the right element.
virtual void ComputeRequiredData(TPZMaterialData &data, TPZVec< REAL > &qsi)
Compute and fill data with requested attributes.
virtual bool IsActiveApproxSpaces(int space_index)
virtual void TransferMultiphysicsElementSolution() override
Defines the interface of a computational element. Computational Element.
Definition: pzcompel.h:59
TPZFMatrix< STATE > & Solution()
Access the solution vector.
Definition: pzcmesh.h:219
#define PZError
Defines the output device to error messages and the DebugStop() function.
Definition: pzerror.h:15
TPZCompMesh * fMesh
Computational mesh to which the element belongs.
Definition: pzcompel.h:64