NeoPZ
pzcreateapproxspace.cpp
Go to the documentation of this file.
1 
6 #include "pzcreateapproxspace.h"
7 #include "pzgeoel.h"
8 #include "pzcmesh.h"
9 #include "pzcondensedcompel.h"
10 #include "pzinterpolationspace.h"
11 
12 #include "pzshapecube.h"
13 #include "pzshapelinear.h"
14 #include "pzshapepiram.h"
15 #include "pzshapepoint.h"
16 #include "pzshapeprism.h"
17 #include "pzshapequad.h"
18 #include "pzshapetetra.h"
19 #include "pzshapetriang.h"
20 
21 #include "pzgeopoint.h"
22 #include "pzgeoprism.h"
23 #include "pzgeopyramid.h"
24 #include "pzgeoquad.h"
25 #include "pzgeotetrahedra.h"
26 #include "pzgeotriangle.h"
27 #include "TPZGeoCube.h"
28 #include "TPZGeoLinear.h"
29 
30 #include "TPZInterfaceEl.h"
31 
32 #include "pzcompelwithmem.h"
33 
34 #ifdef LOG4CXX
35 static LoggerPtr logger(Logger::getLogger("pz.mesh.tpzcreateapproximationspace"));
36 #endif
37 
39 TPZCompEl *CreatePointEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
41 TPZCompEl *CreateLinearEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
43 TPZCompEl *CreateQuadEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
45 TPZCompEl *CreateTriangleEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
47 TPZCompEl *CreateCubeEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
49 TPZCompEl *CreatePrismEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
51 TPZCompEl *CreatePyramEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
53 TPZCompEl *CreateTetraEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index);
54 
55 
56 using namespace pzshape;
57 
58 TPZCompEl *CreateNoElement(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
59 #ifdef LOG4CXX
60  if (logger->isWarnEnabled()) {
61  std::stringstream sout;
62  sout << "Mesh dimension " << mesh.Dimension() << " gel dimension " << gel->Dimension() << " will not create a computational element\n";
63  LOGPZ_WARN(logger, sout.str())
64  }
65 #endif
66  index = -1;
67  return NULL;
68 }
69 
70 
71 TPZCompEl *CreatePointEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
72  if(!gel->Reference() && gel->NumInterfaces() == 0)
73  {
74  return new TPZIntelGen<TPZShapePoint>(mesh,gel,index);
75  }
76  index = -1;
77  return NULL;
78 }
79 TPZCompEl *CreateLinearEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
80  if(!gel->Reference() && gel->NumInterfaces() == 0)
81  {
82  TPZCompEl *result = new TPZIntelGen<TPZShapeLinear>(mesh,gel,index);
83  return result;//new TPZCondensedCompel(result);
84  }
85  index = -1;
86  return NULL;
87 }
88 TPZCompEl *CreateQuadEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
89  if(!gel->Reference() && gel->NumInterfaces() == 0)
90  {
91  return new TPZIntelGen<TPZShapeQuad>(mesh,gel,index);
92  }
93  index = -1;
94  return NULL;
95 }
96 
97 TPZCompEl *CreateTriangleEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
98  if(!gel->Reference() && gel->NumInterfaces() == 0)
99  return new TPZIntelGen<TPZShapeTriang>(mesh,gel,index);
100  index = -1;
101  return NULL;
102 }
103 TPZCompEl *CreateCubeEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
104  if(!gel->Reference() && gel->NumInterfaces() == 0)
105  return new TPZIntelGen<TPZShapeCube>(mesh,gel,index);
106  index = -1;
107  return NULL;
108 }
109 TPZCompEl *CreatePrismEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
110  if(!gel->Reference() && gel->NumInterfaces() == 0)
111  return new TPZIntelGen<TPZShapePrism>(mesh,gel,index);
112  index = -1;
113  return NULL;
114 }
115 TPZCompEl *CreatePyramEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
116  if(!gel->Reference() && gel->NumInterfaces() == 0)
117  return new TPZIntelGen<TPZShapePiram>(mesh,gel,index);
118  index = -1;
119  return NULL;
120 }
121 TPZCompEl *CreateTetraEl(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
122  if(!gel->Reference() && gel->NumInterfaces() == 0)
123  return new TPZIntelGen<TPZShapeTetra>(mesh,gel,index);
124  index = -1;
125  return NULL;
126 }
127 
128 
129 // with mem
130 TPZCompEl *CreatePointElWithMem(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
131  if(!gel->Reference() && gel->NumInterfaces() == 0)
132  return new TPZCompElWithMem <TPZIntelGen<TPZShapePoint> >(mesh,gel,index) ;
133  index = -1;
134  return NULL;
135 }
137  if(!gel->Reference() && gel->NumInterfaces() == 0)
138  return new TPZCompElWithMem <TPZIntelGen<TPZShapeLinear> >(mesh,gel,index);
139  index = -1;
140  return NULL;
141 }
142 TPZCompEl *CreateQuadElWithMem(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
143  if(!gel->Reference() && gel->NumInterfaces() == 0)
144  return new TPZCompElWithMem <TPZIntelGen<TPZShapeQuad> >(mesh,gel,index);
145  index = -1;
146  return NULL;
147 }
149  if(!gel->Reference() && gel->NumInterfaces() == 0)
150  return new TPZCompElWithMem < TPZIntelGen<TPZShapeTriang> >(mesh,gel,index);
151  index = -1;
152  return NULL;
153 }
154 TPZCompEl *CreateCubeElWithMem(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
155  if(!gel->Reference() && gel->NumInterfaces() == 0)
156  return new TPZCompElWithMem <TPZIntelGen<TPZShapeCube> >(mesh,gel,index);
157  index = -1;
158  return NULL;
159 }
160 TPZCompEl *CreatePrismElWithMem(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
161  if(!gel->Reference() && gel->NumInterfaces() == 0)
162  return new TPZCompElWithMem <TPZIntelGen<TPZShapePrism> >(mesh,gel,index);
163  index = -1;
164  return NULL;
165 }
166 TPZCompEl *CreatePyramElWithMem(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
167  if(!gel->Reference() && gel->NumInterfaces() == 0)
168  return new TPZCompElWithMem <TPZIntelGen<TPZShapePiram> >(mesh,gel,index);
169  index = -1;
170  return NULL;
171 }
172 TPZCompEl *CreateTetraElWithMem(TPZGeoEl *gel,TPZCompMesh &mesh,int64_t &index) {
173  if(!gel->Reference() && gel->NumInterfaces() == 0)
174  return new TPZCompElWithMem <TPZIntelGen<TPZShapeTetra> >(mesh,gel,index);
175  index = -1;
176  return NULL;
177 }
178 
184  TPZVec<TPZGeoEl *> elvec(gelindexes.size());
185  TPZGeoMesh *gmesh = cmesh.Reference();
186  for(int64_t el = 0; el<gelindexes.size(); el++)
187  {
188  elvec[el] = gmesh->Element(gelindexes[el]);
189  }
190  int64_t i, nelem = elvec.NElements();
191  int64_t neltocreate = 0;
192  int64_t index;
193  for(i=0; i<nelem; i++) {
194  TPZGeoEl *gel = elvec[i];
195  if(!gel) continue;
196  if (gel->Reference()) {
197  continue;
198  }
199  }
200  std::set<int> matnotfound;
201  int64_t nbl = cmesh.Block().NBlocks();
202  if(neltocreate > nbl)
203  {
204  cmesh.Block().SetNBlocks(neltocreate);
205  }
206  cmesh.Block().SetNBlocks(nbl);
207 
208  for(i=0; i<nelem; i++) {
209  TPZGeoEl *gel = elvec[i];
210  if(!gel || gel->Reference()) continue;
211  int matid = gel->MaterialId();
212  TPZMaterial * mat = cmesh.FindMaterial(matid);
213  if(!mat)
214  {
215  matnotfound.insert(matid);
216  continue;
217  }
218 
219  if(!gel->Reference() && gel->NumInterfaces() == 0)
220  {
221  CreateCompEl(gel,cmesh,index);
222  if (fCreateHybridMesh) {
223  cmesh.ElementVec()[index]->Reference()->ResetReference();
224  }
225 #ifdef LOG4CXX
226  if (logger->isDebugEnabled())
227  {
228 
229  std::stringstream sout;
230  if (index < 0) {
231  if(gel->Dimension() == 0){
232  sout << "Zero dimensional element, is your approximation space Hdiv?. " << std::endl;
233  gel->Print(sout);
234  sout << "No computational element was created. " << std::endl;
235  }
236  }else{
237  cmesh.ElementVec()[index]->Print(sout);
238  }
239  LOGPZ_DEBUG(logger, sout.str())
240  }
241 #endif
242  }
243  }
244  cmesh.InitializeBlock();
245 }
246 
251 void TPZCreateApproximationSpace::BuildMesh(TPZCompMesh &cmesh, const std::set<int> &MaterialIDs) const {
253  int64_t i, nelem = elvec.NElements();
254  int64_t neltocreate = 0;
255  int64_t index;
256  for(i=0; i<nelem; i++) {
257  TPZGeoEl *gel = elvec[i];
258  if(!gel) continue;
259  if (gel->Reference()) {
260  continue;
261  }
262  if(!gel->HasSubElement()) {
263  neltocreate++;
264  }
265  }
266  std::set<int> matnotfound;
267  int64_t nbl = cmesh.Block().NBlocks();
268  if(neltocreate > nbl)
269  {
270  cmesh.Block().SetNBlocks(neltocreate);
271  }
272  cmesh.Block().SetNBlocks(nbl);
273 
274  for(i=0; i<nelem; i++) {
275  TPZGeoEl *gel = elvec[i];
276  if(!gel || gel->Reference()) continue;
277  if(!gel->HasSubElement()) {
278  int matid = gel->MaterialId();
279  TPZMaterial * mat = cmesh.FindMaterial(matid);
280  if(!mat)
281  {
282  matnotfound.insert(matid);
283  continue;
284  }
285  int printing = 0;
286  if (printing) {
287  gel->Print(std::cout);
288  }
289 
290  //checking material in MaterialIDs
291  std::set<int>::const_iterator found = MaterialIDs.find(matid);
292  if (found == MaterialIDs.end())
293  {
294  continue;
295  }
296 
297  if(!gel->Reference() && gel->NumInterfaces() == 0)
298  {
299  CreateCompEl(gel,cmesh,index);
300  if (fCreateHybridMesh) {
301  cmesh.ElementVec()[index]->Reference()->ResetReference();
302  }
303 #ifdef LOG4CXX
304  if (logger->isDebugEnabled())
305  {
306 
307  std::stringstream sout;
308  if (index < 0) {
309  if(gel->Dimension() == 0){
310  sout << "Zero dimensional element, is your approximation space Hdiv?. " << std::endl;
311  gel->Print(sout);
312  sout << "No computational element was created. " << std::endl;
313  }
314  }else{
315  cmesh.ElementVec()[index]->Print(sout);
316  }
317  LOGPZ_DEBUG(logger, sout.str())
318  }
319 #endif
320  }
321  }
322  }
323  cmesh.InitializeBlock();
324 }
325 
328  std::set<int> materialids;
329  std::map<int,TPZMaterial *>::iterator it;
330  for (it = cmesh.MaterialVec().begin(); it != cmesh.MaterialVec().end(); it++) {
331  materialids.insert(it->first);
332  }
333  BuildMesh(cmesh,materialids);
334 }
335 
336 void TPZCreateApproximationSpace::CreateInterfaces(TPZCompMesh &cmesh, const std::set<int> &MaterialIDs){
337  for(int64_t el = 0; el < cmesh.ElementVec().NElements(); el++)
338  {
339  TPZCompEl * compEl = cmesh.ElementVec()[el];
340  if(!compEl) continue;
341  int matid = compEl->Reference()->MaterialId();
342 
343  //checking if matid is in MaterialIDs
344  std::set<int>::iterator it;
345  it = MaterialIDs.find(matid);
346  if(it!=MaterialIDs.end())
347  {
348  TPZInterpolationSpace * interpEl = dynamic_cast<TPZInterpolationSpace *>(compEl);
349  if(!interpEl) continue;
350  interpEl->CreateInterfaces();
351  }
352  }
353 
354 }
355 
357  for(int64_t el = 0; el < cmesh.ElementVec().NElements(); el++)
358  {
359  TPZCompEl * compEl = cmesh.ElementVec()[el];
360  if(!compEl) continue;
361 
362  TPZInterpolationSpace * interpEl = dynamic_cast<TPZInterpolationSpace *>(compEl);
363  if(!interpEl) continue;
364  interpEl->CreateInterfaces();
365  }
366 
367 }
368 
370  cel.SetCreateFunctions(mesh);
371 }
372 
373 
374 
376 
385 
386  /*
387  pzgeom::TPZGeoPoint::fp = TPZCompElDisc::CreateDisc;
388  pzgeom::TPZGeoLinear::fp = TPZCompElDisc::CreateDisc;
389  pzgeom::TPZGeoQuad::fp = TPZCompElDisc::CreateDisc;
390  pzgeom::TPZGeoTriangle::fp = TPZCompElDisc::CreateDisc;
391  pzgeom::TPZGeoPrism::fp = TPZCompElDisc::CreateDisc;
392  pzgeom::TPZGeoTetrahedra::fp = TPZCompElDisc::CreateDisc;
393  pzgeom::TPZGeoPyramid::fp = TPZCompElDisc::CreateDisc;
394  pzgeom::TPZGeoCube::fp = TPZCompElDisc::CreateDisc;
395  */
396 }
397 
398 
400  fp[EPoint] = CreatePointEl;
401  fp[EOned] = CreateLinearEl;
405  fp[EPiramide] = CreatePyramEl;
406  fp[EPrisma] = CreatePrismEl;
407  fp[ECube] = CreateCubeEl;
408 
409  /*
410  pzgeom::TPZGeoPoint::fp = CreatePointEl;
411  pzgeom::TPZGeoLinear::fp = CreateLinearEl;
412  pzgeom::TPZGeoQuad::fp = CreateQuadEl;
413  pzgeom::TPZGeoTriangle::fp = CreateTriangleEl;
414  pzgeom::TPZGeoPrism::fp = CreatePrismEl;
415  pzgeom::TPZGeoTetrahedra::fp = CreateTetraEl;
416  pzgeom::TPZGeoPyramid::fp = CreatePyramEl;
417  pzgeom::TPZGeoCube::fp = CreateCubeEl;
418  */
419 
420 }
421 
423 {
424  // These ones will be always continuous for viscoelasticity
433 
434 }
435 
436 
437 #include "pzelchdiv.h"
438 #include "pzelchdivbound2.h"
439 
441 
442  switch (dimension) {
443  case 1:
450  fp[EPrisma] = CreateNoElement;
451  fp[ECube] = CreateNoElement;
452  break;
453  case 2:
454  fp[EPoint] = CreateNoElement;
460  fp[EPrisma] = CreateNoElement;
461  fp[ECube] = CreateNoElement;
462  break;
463  case 3:
464  fp[EPoint] = CreateNoElement;
465  fp[EOned] = CreateNoElement;
471  fp[ECube] = CreateHDivCubeEl;
472  break;
473  default:
474  DebugStop();
475  break;
476  }
477 
478  /*
479  pzgeom::TPZGeoPoint::fp = CreateHDivPointEl;
480  pzgeom::TPZGeoLinear::fp = CreateHDivLinearEl;
481  pzgeom::TPZGeoQuad::fp = CreateHDivQuadEl;
482  pzgeom::TPZGeoTriangle::fp = CreateHDivTriangleEl;
483  pzgeom::TPZGeoPrism::fp = CreateHDivPrismEl;
484  pzgeom::TPZGeoTetrahedra::fp = CreateHDivTetraEl;
485  pzgeom::TPZGeoPyramid::fp = CreateHDivPyramEl;
486  pzgeom::TPZGeoCube::fp = CreateHDivCubeEl;
487  */
488 }
489 
492 {
493  switch (dimension) {
494  case 1:
501  fp[EPrisma] = CreateNoElement;
502  fp[ECube] = CreateNoElement;
503  break;
504  case 2:
505  fp[EPoint] = CreateNoElement;
511  fp[EPrisma] = CreateNoElement;
512  fp[ECube] = CreateNoElement;
513  break;
514  case 3:
515  fp[EPoint] = CreateNoElement;
516  fp[EOned] = CreateNoElement;
523  break;
524  default:
525  DebugStop();
526  break;
527  }
528 
529 }
530 
531 #if defined(USING_MKL) && defined(USING_LAPACK) && !defined(STATE_COMPLEX)
532 
533 #include "TPZSBFemVolume.h"
534 
535 void TPZCreateApproximationSpace::SetAllCreateFunctionsSBFem(int dimension){
536 
537  switch (dimension) {
538  case 1:
539  DebugStop();
540  break;
541  case 2:
542  fp[EPoint] = CreatePointEl;
543  fp[EOned] = CreateSBFemCompEl;
548  fp[EPrisma] = CreateNoElement;
549  fp[ECube] = CreateNoElement;
550  break;
551  case 3:
552  fp[EPoint] = CreatePointEl;
553  fp[EOned] = CreateSBFemCompEl;
559  fp[ECube] = CreateSBFemCompEl;
560  break;
561  default:
562  DebugStop();
563  break;
564  }
565 }
566 
567 #endif
568 
570 //
571 //void TPZCreateApproximationSpace::SetAllCreateFunctionsHDivFull(int dimension){
572 //
573 // switch (dimension) {
574 // case 1:
575 // fp[EPoint] = CreateHDivBoundPointEl;
576 // fp[EOned] = CreateHDivFullLinearEl;
577 // fp[ETriangle] = CreateNoElement;
578 // fp[EQuadrilateral] = CreateNoElement;
579 // fp[ETetraedro] = CreateNoElement;
580 // fp[EPiramide] = CreateNoElement;
581 // fp[EPrisma] = CreateNoElement;
582 // fp[ECube] = CreateNoElement;
583 // break;
584 // case 2:
585 // fp[EPoint] = CreateNoElement;
586 // fp[EOned] = CreateHDivBoundLinearEl;
587 // fp[ETriangle] = CreateHDivFullTriangleEl;
588 // fp[EQuadrilateral] = CreateHDivFullQuadEl;
589 // fp[ETetraedro] = CreateNoElement;
590 // fp[EPiramide] = CreateNoElement;
591 // fp[EPrisma] = CreateNoElement;
592 // fp[ECube] = CreateNoElement;
593 // break;
594 // case 3:
595 // fp[EPoint] = CreateNoElement;
596 // fp[EOned] = CreateNoElement;
597 // fp[ETriangle] = CreateHDivBoundTriangleEl;
598 // fp[EQuadrilateral] = CreateHDivBoundQuadEl;
599 // fp[ETetraedro] = CreateHDivFullTetraEl;
600 // fp[EPiramide] = CreateHDivFullPyramEl;
601 // fp[EPrisma] = CreateHDivFullPrismEl;
602 // fp[ECube] = CreateHDivFullCubeEl;
603 // break;
604 // default:
605 // DebugStop();
606 // break;
607 // }
608 //
609 //}
610 
611 
612 
613 #ifndef STATE_COMPLEX
614 #include "pzhdivpressure.h"
615 
617  switch (dimension) {
618  case 1:
625  fp[EPrisma] = CreateNoElement;
626  fp[ECube] = CreateNoElement;
627  break;
628  case 2:
629  fp[EPoint] = CreateNoElement;
635  fp[EPrisma] = CreateNoElement;
636  fp[ECube] = CreateNoElement;
637  break;
638  case 3:
639  fp[EPoint] = CreateNoElement;
640  fp[EOned] = CreateNoElement;
647  break;
648  default:
649  DebugStop();
650  break;
651  }
652 
653 }
654 #endif
655 
656 
657 #include "pzreferredcompel.h"
658 #include "pzelctemp.h"
660 
669 
670  /*
671  pzgeom::TPZGeoPoint::fp = CreateReferredDisc;
672  pzgeom::TPZGeoLinear::fp = CreateReferredDisc;
673  pzgeom::TPZGeoQuad::fp = CreateReferredDisc;
674  pzgeom::TPZGeoTriangle::fp = CreateReferredDisc;
675  pzgeom::TPZGeoPrism::fp = CreateReferredDisc;
676  pzgeom::TPZGeoTetrahedra::fp = CreateReferredDisc;
677  pzgeom::TPZGeoPyramid::fp = CreateReferredDisc;
678  pzgeom::TPZGeoCube::fp = CreateReferredDisc;
679  */
680 }
681 
683 
692 
693  /*
694  pzgeom::TPZGeoPoint::fp = CreateReferredPointEl;
695  pzgeom::TPZGeoLinear::fp = CreateReferredLinearEl;
696  pzgeom::TPZGeoQuad::fp = CreateReferredQuadEl;
697  pzgeom::TPZGeoTriangle::fp = CreateReferredTriangleEl;
698  pzgeom::TPZGeoPrism::fp = CreateReferredPrismEl;
699  pzgeom::TPZGeoTetrahedra::fp = CreateReferredTetraEl;
700  pzgeom::TPZGeoPyramid::fp = CreateReferredPyramEl;
701  pzgeom::TPZGeoCube::fp = CreateReferredCubeEl;
702  */
703 
704 }
705 
706 #include "pzmultiphysicscompel.h"
708 
717 
718  /*
719  pzgeom::TPZGeoPoint::fp = CreateMultiphysicsPointEl;
720  pzgeom::TPZGeoLinear::fp = CreateMultiphysicsLinearEl;
721  pzgeom::TPZGeoTriangle::fp = CreateMultiphysicsTriangleEl;
722  pzgeom::TPZGeoQuad::fp = CreateMultiphysicsQuadEl;
723  pzgeom::TPZGeoCube::fp = CreateMultiphysicsCubeEl;
724  pzgeom::TPZGeoPrism::fp = CreateMultiphysicsPrismEl;
725  pzgeom::TPZGeoTetrahedra::fp = CreateMultiphysicsTetraEl;
726  pzgeom::TPZGeoPyramid::fp = CreateMultiphysicsPyramEl;
727  */
728 }
729 
731 {
732 
741 
742 }
743 
744 /*
745  * @brief Create a computational element using the function pointer for the topology
746  */
748 {
749  switch (gel->Type()) {
750  case EPoint:
751  return fp[EPoint](gel,mesh,index);
752  break;
753  case EOned:
754  return fp[EOned](gel,mesh,index);
755  break;
756  case EQuadrilateral:
757  return fp[EQuadrilateral](gel,mesh,index);
758  break;
759  case ETriangle:
760  return fp[ETriangle](gel,mesh,index);
761  break;
762  case EPiramide:
763  return fp[EPiramide](gel,mesh,index);
764  break;
765  case EPrisma:
766  return fp[EPrisma](gel,mesh,index);
767  break;
768  case ETetraedro:
769  return fp[ETetraedro](gel,mesh,index);
770  break;
771  case ECube:
772  return fp[ECube](gel,mesh,index);
773  break;
774  default:
775  DebugStop();
776  break;
777  }
778  return 0;
779 }
780 
786 {
787  fp[EPoint] = createfuncs[EPoint];
788  fp[EOned] = createfuncs[EOned];
789  fp[ETriangle] = createfuncs[ETriangle];
790  fp[EQuadrilateral] = createfuncs[EQuadrilateral];
791  fp[ETetraedro] = createfuncs[ETetraedro];
792  fp[EPiramide] = createfuncs[EPiramide];
793  fp[EPrisma] = createfuncs[EPrisma];
794  fp[ECube] = createfuncs[ECube];
795 
796 }
797 
798 #include "pzcondensedcompel.h"
799 
804 {
805  int64_t nel = cmesh.NElements();
806  int64_t iel;
807  for (iel=0; iel<nel; iel++) {
808  TPZCompEl *cel = cmesh.ElementVec()[iel];
809  if(!cel) {
810  continue;
811  }
812  new TPZCondensedCompEl(cel);
813  }
814 
815 }
816 
821 {
822  int64_t nel = cmesh.NElements();
823  int64_t iel;
824  for (iel=0; iel<nel; iel++) {
825  TPZCompEl *cel = cmesh.ElementVec()[iel];
826  TPZCondensedCompEl *condel = dynamic_cast<TPZCondensedCompEl *>(cel);
827  if(!condel) {
828  continue;
829  }
830  condel->Unwrap();
831  }
832 }
833 
838 {
839  int64_t numcell = cmesh.NElements();
840  int64_t el;
841  for (el = 0; el<numcell ; el++) {
842  TPZCompEl *cel = cmesh.ElementVec()[el];
843  TPZInterpolationSpace *intel = dynamic_cast<TPZInterpolationSpace *>(cel);
844  if (!intel) {
845  continue;
846  }
847  intel->SetPreferredOrder(1);
848  }
849  cmesh.ExpandSolution();
850  for (el = 0; el<numcell ; el++) {
851  TPZCompEl *cel = cmesh.ElementVec()[el];
852  TPZInterpolatedElement *intel = dynamic_cast<TPZInterpolatedElement *>(cel);
853  if (!intel) {
854  continue;
855  }
856  TPZGeoEl *gel = intel->Reference();
857  int geldim = gel->Dimension();
858  int is;
859  int nsides = gel->NSides();
860  for (is=0; is<nsides; is++) {
861  if (gel->SideDimension(is) != geldim-1) {
862  continue;
863  }
864  int nsconnects = intel->NSideConnects(is);
865  // only interested in HDiv elements
866  if (nsconnects != 1) {
867  continue;
868  }
869  int64_t cindex = intel->SideConnectIndex(0, is);
870  TPZConnect &c = intel->Connect(intel->SideConnectLocId(0,is));
871  if (c.HasDependency()) {
872  continue;
873  }
874  int nshape = 1;
875  int nstate = 1;
876  int order = 0;
877  int64_t cindex2 = cmesh.AllocateNewConnect(nshape, nstate, order);
878  // TPZConnect &c2 = cmesh.ConnectVec()[cindex];
879  TPZFNMatrix<2,REAL> depmat(2,1,1.);
880  c.AddDependency(cindex, cindex2, depmat, 0, 0, 2, 1);
881  }
882  }
883  cmesh.ExpandSolution();
884 }
885 
890 {
891  int64_t numcell = cmesh.NElements();
892  int64_t el;
893  for (el = 0; el<numcell ; el++) {
894  TPZCompEl *cel = cmesh.ElementVec()[el];
895  TPZInterpolatedElement *intel = dynamic_cast<TPZInterpolatedElement *>(cel);
896  if (!intel) {
897  continue;
898  }
899  TPZGeoEl *gel = intel->Reference();
900  int geldim = gel->Dimension();
901  int is;
902  int nsides = gel->NSides();
903  for (is=0; is<nsides; is++) {
904  if (gel->SideDimension(is) != geldim-1) {
905  continue;
906  }
907  int nsconnects = intel->NSideConnects(is);
908  // only interested in HDiv elements
909  if (nsconnects != 1) {
910  continue;
911  }
912  // int cindex = intel->SideConnectIndex(0, is);
913  TPZConnect &c = intel->Connect(intel->SideConnectLocId(0,is));
914  if (c.HasDependency()) {
915  c.RemoveDepend();
916  }
917  }
918  }
919  cmesh.ExpandSolution();
920  cmesh.CleanUpUnconnectedNodes();
921 }
922 
924 void TPZCreateApproximationSpace::CreateInterfaceElements(TPZCompMesh *mesh, bool betweencontinuous, bool multiphysics)
925 {
926  TPZChunkVector<TPZCompEl *> compelvec = mesh->ElementVec();
927  int64_t nel = compelvec.NElements();
928  for (int64_t el=0; el<nel; el++) {
929  TPZCompEl *cel = compelvec[el];
930  if (!cel) {
931  continue;
932  }
933  if(!multiphysics)
934  {
935  TPZInterpolationSpace *intel = dynamic_cast<TPZInterpolationSpace *>(cel);
936  if (intel) {
937  intel->CreateInterfaces(betweencontinuous);
938  }
939  }
940  else {
941  TPZMultiphysicsElement *mfcel = dynamic_cast<TPZMultiphysicsElement *>(cel);
942  if (!mfcel) {
943  continue;
944  }
945  mfcel->CreateInterfaces();
946  }
947 
948  }
949 }
950 
952 void TPZCreateApproximationSpace::Hybridize(TPZCompMesh &cmesh,const std::set<int> &matids, bool isconnectedElem)
953 {
955  cmesh.Reference()->ResetReference();
956  int nel = cmesh.NElements();
957  for (int el=0; el<nel; el++) {
958  TPZCompEl *cel = cmesh.ElementVec()[el];
959  if (!cel) {
960  continue;
961  }
962  TPZInterfaceElement *face = dynamic_cast<TPZInterfaceElement *>(cel);
963  if (!face) {
964  continue;
965  }
966  int matid = face->Material()->Id();
967  if (matids.find(matid) == matids.end()) {
968  continue;
969  }
970  TPZCompElSide left, right;
971  left = face->LeftElementSide();
972  right = face->RightElementSide();
973  int leftmatid = left.Element()->Material()->Id();
974  int rightmatid = right.Element()->Material()->Id();
975  TPZGeoEl *gelface = face->Reference();
976  gelface = gelface->CreateBCGeoEl(gelface->NSides()-1, matid);
977  delete face;
978  int64_t index;
979 
980  //hp mesh
981  TPZInterpolationSpace *leftint = dynamic_cast<TPZInterpolationSpace *>(left.Element());
982  TPZInterpolationSpace *rightint = dynamic_cast<TPZInterpolationSpace *>(right.Element());
983  int leftorder = leftint->MaxOrder();
984  int rightorder = rightint->MaxOrder();
985  int neworder = MIN(leftorder,rightorder);
986  if(neworder<0) neworder = MAX(leftorder,rightorder);
987  cmesh.SetDefaultOrder(neworder);
988 // int neworder = MAX(leftorder,rightorder);
989 // cmesh.SetDefaultOrder(neworder);
990 
991 
992  cmesh.ApproxSpace().CreateCompEl(gelface, cmesh, index);
993  TPZCompEl *newcel = cmesh.ElementVec()[index];
994  if(!isconnectedElem){
995  gelface->ResetReference();
996  }
997  TPZCompElSide center(newcel,gelface->NSides()-1);
998  //
999  TPZGeoEl *leftgelface = gelface->CreateBCGeoEl(gelface->NSides()-1, leftmatid);
1000  TPZGeoEl *rightgelface = gelface->CreateBCGeoEl(gelface->NSides()-1, rightmatid);
1001 
1002  new TPZInterfaceElement(cmesh,leftgelface,index,left,center);
1003  new TPZInterfaceElement(cmesh,rightgelface,index,right,center);
1004 
1005 // TPZInterfaceElement *faceleft = new TPZInterfaceElement(cmesh,leftgelface,index,left,center);
1006 // TPZInterfaceElement *faceright = new TPZInterfaceElement(cmesh,rightgelface,index,right,center);
1007 
1008  }
1009  cmesh.CleanUpUnconnectedNodes();
1010  cmesh.ExpandSolution();
1011 }
1012 
1014  return Hash("TPZCreateApproximationSpace");
1015 }
1016 
1017 void TPZCreateApproximationSpace::Read(TPZStream& buf, void* context) { //ok
1018  buf.Read(fCreateHybridMesh);
1019  buf.Read(fCreateLagrangeMultiplier);
1020  buf.Read(fCreateWithMemory);
1021 }
1022 
1023 void TPZCreateApproximationSpace::Write(TPZStream& buf, int withclassid) const { //ok
1024  buf.Write(fCreateHybridMesh);
1025  buf.Write(fCreateLagrangeMultiplier);
1026  buf.Write(fCreateWithMemory);
1027 }
1028 
int64_t NElements() const
Number of computational elements allocated.
Definition: pzcmesh.h:169
void SetAllCreateFunctionsHDivPressure(int meshdim)
Create an approximation space with HDiv elements and full basis for quadrilateral element...
TPZGeoMesh * Reference() const
Returns a pointer to the geometrical mesh associated.
Definition: pzcmesh.h:209
void SetAllCreateFunctionsMultiphysicElemWithMem()
Create an approximation space based on multiphysics elements with memory.
TPZCompEl * CreateReferredPyramEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates pyramidal referred computational element related with geometric element gel.
void SetAllCreateFunctionsDiscontinuous()
Create discontinuous approximation spaces.
Contains TPZShapeTetra class which implements the shape functions of a tetrahedral element...
void SetAllCreateFunctions(TPZCompEl &cel, TPZCompMesh *mesh)
Create approximation spaces corresponding to the space defined by cel.
static void UndoCondenseLocalEquations(TPZCompMesh &cmesh)
Undo the encapsulate elements.
TPZCompEl * CreateTetraElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
TPZCompEl * CreateRefHDivTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Definition: pzelchdiv.cpp:1876
void CreateInterfaces(bool BetweenContinuous=false)
Create interfaces between this and its neighbours.
Contains declaration of TPZIntelGen class which implements a generic computational element...
void SetAllCreateFunctionsContinuousWithMem()
Create an approximation space with continous elements with memory. Only dimension 3 elements quem hav...
TPZCompEl * CreateMultiphysicsQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational quadrilateral element for Multiphysics approximate space.
Implements computational element and a side. Computational Element.
Definition: pzcompel.h:632
TPZCompEl * CreateHDivPrismEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational prismal element for HDiv approximate space.
Definition: pzelchdiv.cpp:1837
Represents a set of shape functions associated with a computational element/side. Computational Eleme...
Definition: pzconnect.h:30
static void MakeRaviartThomas(TPZCompMesh &cmesh)
transform in low order Raviar Tomas
TPZCompEl * CreateHDivPressurePrismEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational prismal element for HDivPressure approximate space.
TPZCompEl * CreateHDivCubeEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational cube element for HDiv approximate space.
Definition: pzelchdiv.cpp:1833
TPZCompEl * CreateQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational quadrilateral element.
TPZCompEl * CreateLinearElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
int MaterialId() const
Returns the material index of the element.
Definition: pzgeoel.h:250
TPZCompEl * CreateMultiphysicsCubeElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational cube element for Multiphysics approximate space.
TPZCompEl * CreateMultiphysicsTriangleElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational triangular element for Multiphysics approximate space.
TPZCompEl * CreateMultiphysicsLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational linear element for Multiphysics approximate space.
TPZCompEl * CreateMultiphysicsCubeEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational cube element for Multiphysics approximate space.
Contains the declaration of the TPZCompElWithMem class, it is as TPZCompEl with enable material memor...
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.
Definition: pzcmesh.h:693
virtual void SetCreateFunctions(TPZCompMesh *mesh)
Sets create function in TPZCompMesh to create elements of this type.
Definition: pzcompel.cpp:1133
TPZCompEl * CreateRefHDivQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Definition: pzelchdiv.cpp:1872
static void Hybridize(TPZCompMesh &cmesh, const std::set< int > &matids, bool isconnectedElem=false)
this method will substitute all interface elements with materialid within the set by three elements :...
static void UndoMakeRaviartThomas(TPZCompMesh &cmesh)
transform in low order Raviar Tomas
groups all classes dedicated to the computation of shape functions
Definition: pzshapeextend.h:16
TPZCompEl * CreateHDivBoundPointEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational point element for HDiv approximate space.
Definition: pzelchdiv.cpp:1805
TPZCompEl * CreateRefHDivCubeEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Definition: pzelchdiv.cpp:1880
TPZCompEl * CreatePrismEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational prismal element.
Contains declaration of TPZInterpolationSpace class which implements the interface for interpolated c...
TPZDepend * AddDependency(int64_t myindex, int64_t dependindex, TPZFMatrix< REAL > &depmat, int64_t ipos, int64_t jpos, int isize, int jsize)
Add dependency between connects.
Definition: pzconnect.cpp:130
void SetCreateFunctions(TPZVec< TCreateFunction > &createfuncs)
Set custom function pointers.
TPZCompEl * CreateRefHDivBoundQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational quadrilateral element for HDiv approximate space.
void SetAllCreateFunctionsContinuousReferred()
Create a continuous approximation space with referred elements.
TPZCompEl * CreateReferredTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates triangular referred computational element related with geometric element gel.
Contains declaration of TPZCompElHDiv class which implements a generic computational element (HDiv sc...
int64_t NElements() const
Access method to query the number of elements of the vector.
Implements a chunk vector with free store administration. Utility.
Definition: TPZStream.h:39
#define LOGPZ_WARN(A, B)
Define log for warnings.
Definition: pzlog.h:91
#define MAX(a, b)
Gets maxime value between a and b.
Definition: pzreal.h:81
virtual int NSides() const =0
Returns the number of connectivities of the element.
TPZCompEl * CreateMultiphysicsTetraEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational tetrahedral element for Multiphysics approximate space.
virtual int SideDimension(int side) const =0
Return the dimension of side.
TPZCompEl * CreateHDivTetraEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational tetrahedral element for HDiv approximate space.
Definition: pzelchdiv.cpp:1845
TPZCompEl * CreateMultiphysicsPyramElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational pyramidal element for Multiphysics approximate space.
static void CreateInterfaceElements(TPZCompMesh *mesh, bool onlydiscontinuous=true, bool multiphysics=false)
Create interface elements between the computational elements.
void SetAllCreateFunctionsDiscontinuousReferred()
Create a discontinuous approximation space with referred elements.
void SetAllCreateFunctionsMultiphysicElem()
Create an approximation space based on multiphysics elements.
Contains TPZShapeLinear class which implements the shape functions of a linear one-dimensional elemen...
TPZCompEl * CreateHDivPressureTetraEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational tetrahedral element for HDivPressure approximate space.
TPZCompEl * CreatePointEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational point element.
It has the declaration of the TPZMultiphysicsCompEl class.
void SetDefaultOrder(int order)
Definition: pzcmesh.h:403
This abstract class defines the behaviour which each derived class needs to implement.
Definition: TPZMaterial.h:39
TPZCompEl * CreatePrismElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
static void CreateInterfaces(TPZCompMesh &cmesh, const std::set< int > &MaterialIDs)
Creates the interface elements.
Contains TPZShapeCube class which implements the shape functions of a hexaedral element.
virtual TPZMaterial * Material() const
Identify the material object associated with the element.
Definition: pzcompel.cpp:959
void SetAllCreateFunctionsHDiv(int meshdim)
Create an approximation space with HDiv elements.
TPZCompEl * CreateMultiphysicsTetraElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational tetrahedral element for Multiphysics approximate space.
int64_t size() const
Returns the number of elements of the vector.
Definition: pzvec.h:196
TPZCompEl * CreateLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational linear element.
TPZCompEl * CreateHDivPyramEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational pyramidal element for HDiv approximate space.
Definition: pzelchdiv.cpp:1841
TPZCompEl * CreateRefHDivBoundLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational linear element for HDiv approximate space.
TPZCompEl * CreateHDivPressureLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational linear element for HDivPressure approximate space.
TPZCompEl * CreateNoElement(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
void Unwrap()
unwrap the condensed element from the computational element and delete the condensed element ...
TPZCreateApproximationSpace & ApproxSpace()
Definition: pzcmesh.h:498
TPZCompEl * CreateHDivTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational triangular element for HDiv approximate space.
Definition: pzelchdiv.cpp:1829
virtual void Write(const bool val)
Definition: TPZStream.cpp:8
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
TPZCompEl * CreateSBFemCompEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Contains the TPZGeoTetrahedra class which implements the geometry of a tetrahedral element...
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
Contains declaration of TPZInterfaceElement class which computes the contribution over an interface b...
TPZCompElSide & LeftElementSide()
Returns left neighbor.
virtual int SideConnectLocId(int icon, int is) const override=0
Returns the local node number of icon along is.
virtual void ExpandSolution()
Adapt the solution vector to new block dimensions.
Definition: pzcmesh.cpp:396
TPZCompEl * CreateRefHDivPyramEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Definition: pzelchdiv.cpp:1888
#define LOGPZ_DEBUG(A, B)
Define log for debug info.
Definition: pzlog.h:87
int ClassId() const override
Define the class id associated with the class.
TPZCompEl * CreateRefHDivBoundPointEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational point element for HDiv approximate space.
int Dimension() const
Returns the dimension of the simulation.
Definition: pzcmesh.h:148
TPZCompEl * CreateHDivBoundTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational triangular element for HDiv approximate space.
Definition: pzelchdiv.cpp:1817
int NumInterfaces()
Returns number of TPZInterfaceElement pointing to this.
Definition: pzgeoel.h:94
virtual MElementType Type() const =0
Returns the element type acording to pzeltype.h.
TPZMaterial * FindMaterial(int id)
Find the material with identity id.
Definition: pzcmesh.cpp:297
TPZCompEl * Reference() const
Return a pointer to the element referenced by the geometric element.
Definition: pzgeoel.h:750
int HasDependency() const
Returns whether exist dependecy information.
Definition: pzconnect.h:292
virtual TPZGeoEl * CreateBCGeoEl(int side, int bc)=0
Method which creates a geometric element on the side of an existing element.
TPZCompEl * CreateRefHDivPrismEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Definition: pzelchdiv.cpp:1884
TPZCompEl * CreateTetraEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational tetrahedral element.
This class implements the TPZCompEl structure to enable material memory feature. It should be instan...
TPZCompEl * CreateHDivBoundQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational quadrilateral element for HDiv approximate space.
Definition: pzelchdiv.cpp:1813
void SetAllCreateFunctionsContinuous()
Create continuous approximation spaces.
const TPZBlock< STATE > & Block() const
Access the block structure of the solution vector.
Definition: pzcmesh.h:213
TPZCompEl * CreateRefHDivLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Definition: pzelchdiv.cpp:1868
TPZCompEl * CreateTriangleElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
void Read(TPZStream &buf, void *context) override
read objects from the stream
TPZCompEl * CreateCubeElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
TPZCompElSide & RightElementSide()
Returns right neighbor.
TPZCompEl * CreateRefHDivTetraEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Definition: pzelchdiv.cpp:1892
Class which implements an element which condenses the internal connects.
TPZCompEl * CreatePointElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
#define MIN(a, b)
Gets minime value between a and b.
Definition: pzreal.h:85
Contains TPZShapePoint class which implements the shape function associated with a point...
TPZCompEl * CreateMultiphysicsPointEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational point element for Multiphysics approximate space.
int SetNBlocks(const int num_of_blocks)
Sets number of blocks on diagonal matrix.
Definition: pzblock.cpp:91
Contains declaration of TPZCompMesh class which is a repository for computational elements...
TPZCompEl * CreatePyramEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational pyramidal element.
virtual TPZConnect & Connect(int i) const
Returns a pointer to the ith node.
Definition: pzcompel.cpp:298
Contains the TPZGeoCube class which implements the geometry of hexahedra element. ...
int32_t Hash(std::string str)
Definition: TPZHash.cpp:10
Contains the TPZGeoPoint class which implements the geometry of a point element or 0-D element...
std::map< int,TPZMaterial *> & MaterialVec()
Returns a reference to the material pointers vector.
Definition: pzcmesh.h:203
Computes the contribution over an interface between two discontinuous elements. Computational Element...
virtual int HasSubElement() const =0
Return 1 if the element has subelements.
Contains declaration of TPZCompElHDivPressure class which implements a generic computational element ...
TPZCompEl * CreateMultiphysicsPrismEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational prismal element for Multiphysics approximate space.
Contains TPZShapePrism class which implements the shape functions of a prism element.
Implements the interfaces for TPZCompElDisc, TPZInterfaceElement and TPZInterpolatedElement. Computational element.
int NBlocks() const
Returns number of blocks on diagonal.
Definition: pzblock.h:165
virtual void SetPreferredOrder(int order)=0
Defines the desired order for entire element.
TPZCompEl * CreateCubeEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational cube element.
static TPZCompEl * CreateDisc(TPZGeoEl *geo, TPZCompMesh &mesh, int64_t &index)
Creates discontinuous computational element.
TPZCompEl * CreateReferredPointEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates point referred computational element related with geometric element gel.
virtual void CleanUpUnconnectedNodes()
Delete the nodes which have no elements connected to them.
Definition: pzcmesh.cpp:498
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
TPZCompEl * CreateCompEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index) const
Create a computational element using the function pointer for the topology.
TPZGeoEl * Reference() const
Return a pointer to the corresponding geometric element if such exists, return 0 otherwise.
Definition: pzcompel.cpp:1137
virtual int NSideConnects(int iside) const override=0
Returns the number of dof nodes along side iside.
This class implements a geometric mesh for the pz environment. Geometry.
Definition: pzgmesh.h:48
void ResetReference()
Reset the element referenced by the geometric element to NULL.
Definition: pzgeoel.h:431
int64_t SideConnectIndex(int icon, int is) const
Returns the index of the c th connect object along side is.
Definition: pzintel.cpp:101
TPZCompEl * CreateReferredTetraEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates tetrahedral referred computational element related with geometric element gel...
Contains declaration of TPZCompElHDivBound2 class which implements a generic computational element (H...
TPZCompEl * CreatePyramElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
TPZCompEl * CreateHDivBoundLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational linear element for HDiv approximate space.
Definition: pzelchdiv.cpp:1809
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
Contains the functions to create different computational elements (one- two- three-dimensional).
TPZAdmChunkVector< TPZCompEl * > & ElementVec()
Returns a reference to the element pointers vector.
Definition: pzcmesh.h:183
TPZCompEl * CreateMultiphysicsPyramEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational pyramidal element for Multiphysics approximate space.
Definition: pzeltype.h:61
TPZCompEl * CreateReferredQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates quadrilateral referred computational element related with geometric element gel...
void BuildMesh(TPZCompMesh &cmesh, const std::set< int > &MaterialIDs) const
Creates the computational elements, and the degree of freedom nodes.
TPZCompEl * CreateReferredLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates linear referred computational element related with geometric element gel. ...
int Id() const
Definition: TPZMaterial.h:170
void RemoveDepend(int64_t myindex, int64_t dependindex)
Remove dependency between connects if exist.
Definition: pzconnect.cpp:178
TPZCompEl * CreateHDivPressureCubeEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational cube element for HDivPressure approximate space.
virtual int MaxOrder()
Returns the max order of interpolation.
Contains TPZShapePiram class which implements the shape functions of a pyramid element.
TPZCompEl * CreateMultiphysicsPointElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational point element for Multiphysics approximate space.
Contains the TPZGeoPyramid class which implements the geometry of pyramid element.
TPZCompEl * CreateReferredCubeEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates cube referred computational element related with geometric element gel.
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
TPZCompEl * CreateHDivQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational quadrilateral element for HDiv approximate space.
Definition: pzelchdiv.cpp:1825
TPZCompEl * CreateHDivPressureQuadEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational quadrilateral element for HDivPressure approximate space.
Contains the TPZGeoPrism class which implements the geometry of a prism element.
Contains declaration of TPZReferredCompEl class which generates computational elements.
TPZCompEl * CreateQuadElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
TPZCompEl * CreateMultiphysicsLinearElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational linear element for Multiphysics approximate space.
TPZCompEl * CreateReferredPrismEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates prismal referred computational element related with geometric element gel.
TPZCompEl * CreateHDivPressureTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational triangular element for HDivPressure approximate space.
void InitializeBlock()
Resequence the block object, remove unconnected connect objects and reset the dimension of the soluti...
Definition: pzcmesh.cpp:391
Definition: pzeltype.h:55
virtual void Print(std::ostream &out=std::cout)
Print all relevant data of the element to cout.
Definition: pzgeoel.cpp:238
void ResetReference()
Resets all load references in elements and nodes.
Definition: pzgmesh.cpp:197
static void CondenseLocalEquations(TPZCompMesh &cmesh)
Encapsulate the elements in condensed computational elements.
TPZCompEl * CreateRefHDivBoundTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational triangular element for HDiv approximate space.
TPZCompEl * CreateMultiphysicsTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational triangular element for Multiphysics approximate space.
Defines the interface of a computational element. Computational Element.
Definition: pzcompel.h:59
Contains the declaration of the TPZCondensedCompEl class, which implements an computational element w...
TPZCompEl * CreateReferredDisc(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates discontinuous referred computational element related with geometric element gel...
Contains TPZShapeQuad class which implements the shape functions of a quadrilateral element...
void SetAllCreateFunctionsHDivReferred(int meshdim)
Create an approximation space with HDiv elements.
TPZCompEl * CreateMultiphysicsQuadElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational quadrilateral element for Multiphysics approximate space.
TPZCompEl * CreateHDivPressurePyramEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational pyramidal element for HDivPressure approximate space.
TPZCompEl * CreateHDivLinearEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational linear element for HDiv approximate space.
Definition: pzelchdiv.cpp:1821
Contains TPZShapeTriang class which implements the shape functions of a triangular element...
Implements computational element based on an interpolation space. Computational Element.
Definition: pzintel.h:27
Implements an interface to register a class id and a restore function. Persistence.
Definition: TPZSavable.h:150
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...
Definition: pzfmatrix.h:716
TPZCompEl * CreateMultiphysicsPrismElWithMem(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational prismal element for Multiphysics approximate space.
TPZCompEl * CreateTriangleEl(TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
Creates computational triangular element.
virtual void Read(bool &val)
Definition: TPZStream.cpp:91
TPZAdmChunkVector< TPZGeoEl * > & ElementVec()
Methods for handling pzlists.
Definition: pzgmesh.h:138
Implements a generic computational element. Computational Element.
Definition: pzelctemp.h:20