NeoPZ
TPZMHMixedMeshControl.h
Go to the documentation of this file.
1 //
2 // TPZMHMixedMeshControl.hpp
3 // PZ
4 //
5 // Created by Philippe Devloo on 09/10/16.
6 //
7 //
8 
9 #ifndef TPZMHMixedMeshControl_hpp
10 #define TPZMHMixedMeshControl_hpp
11 
12 #include <stdio.h>
13 
14 #include "TPZMHMeshControl.h"
15 
18 {
19 
20 protected:
22  // this mesh is the same as fCMesh if there are no lagrange multipliers assocated with the average pressure
24 
27 
28 
29 public:
30 
32  {
33 
34  }
35 
37  // TPZMHMixedMeshControl(TPZAutoPointer<TPZGeoMesh> gmesh, std::set<int64_t> &coarseindices);
38 
40 
42 
43 
45  {
46  fFluxMesh = copy.fFluxMesh;
47  }
48 
50  {
51  fFluxMesh = cp.fFluxMesh;
53  return *this;
54  }
55 
56  virtual ~TPZMHMixedMeshControl();
58  virtual void InsertPeriferalMaterialObjects();
59 
62 
65 
68 
70  virtual void BuildComputationalMesh(bool usersubstructure);
71 
73  {
74  return fFluxMesh;
75  }
76 
79  {
80  if (flag == true) {
81  DebugStop();
82  }
83  }
84 
86  virtual void Hybridize(bool flag)
87  {
88  DebugStop();
89  }
90 
93  {
94  meshvec.Resize(2);
95  meshvec[0] = fFluxMesh.operator->();
96  meshvec[1] = fPressureFineMesh.operator->();
97  }
98 
100  {
102  result[0] = fFluxMesh;
103  result[1] = fPressureFineMesh;
104  return result;
105  }
106 
107 
109  void Print(std::ostream &out);
110 
112  virtual void PrintFriendly(std::ostream &out)
113  {
114 
115  }
116 
117 protected:
118 
119 
120 
122  void CreateHDivMHMMesh();
123 
125  virtual void CreatePressureMHMMesh();
126 
128  virtual void CreateRotationMesh();
129 
130  // create the elements domain per domain with approximation spaces disconnected from each other
131  virtual void CreateInternalFluxElements();
132 
133  // create the approximation space associated with the skeleton and restrain the connects
134  virtual void CreateSkeleton();
135 
136 
139 
141  void BuildMultiPhysicsMesh();
142 
144  virtual void CreateMultiPhysicsInterfaceElements(int dim);
145 
147  virtual void CreateMultiPhysicsInterfaceElements(int dim, int pressmatid, std::pair<int,int> skelmatid);
148 
150  void HideTheElements();
151 
154  virtual void HybridizeSkeleton(int skeletonmatid, int pressurematid);
155 
158 
160  virtual void GroupandCondenseElements();
161 
163  void DeletePressureElements();
164 };
165 
166 #endif /* TPZMHMixedMeshControl_hpp */
class for creating TPZMHMM with Mixed Meshes
virtual void BuildComputationalMesh(bool usersubstructure)
Create all data structures for the computational mesh.
virtual void Hybridize(bool flag)
Set the hybridization to true.
void CreateHDivMHMMesh()
Create the mesh of the flux approximation space.
TPZVec< TPZAutoPointer< TPZCompMesh > > GetMeshes()
Implements a vector class which allows to use external storage provided by the user. Utility.
Definition: pzquad.h:16
void BuildMultiPhysicsMesh()
build the multi physics mesh (not at the finest geometric mesh level
void GetMeshVec(TPZVec< TPZCompMesh *> &meshvec)
Put the pointers to the meshes in a vector.
TPZMHMixedMeshControl & operator=(const TPZMHMixedMeshControl &cp)
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
TPZMHMeshControl & operator=(const TPZMHMeshControl &cp)
virtual void HybridizeSkeleton(int skeletonmatid, int pressurematid)
virtual void InsertPeriferalPressureMaterialObjects()
Insert the necessary Pressure material objects to create the flux mesh.
void OptimizeInterfaceElements()
switch the elements pointed to by the interface by lower dimensional elements
virtual void CreateMultiPhysicsInterfaceElements(int dim)
Create the interfaces between the pressure elements of dimension dim.
virtual void CreatePressureMHMMesh()
Create the pressure mesh which is dual to the flux mesh.
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
virtual void CreateRotationMesh()
Create the rotation mesh to elasticity problem.
TPZAutoPointer< TPZCompMesh > fFluxMesh
computational mesh to contain the pressure elements
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
virtual void GroupandCondenseElements()
group and condense the elements
virtual void PrintFriendly(std::ostream &out)
print in a user friendly manner
virtual void InsertPeriferalHdivMaterialObjects()
Insert the necessary H(div) material objects to create the flux mesh.
void CreateHDivPressureMHMMesh()
Create the multiphysics mesh.
TPZAutoPointer< TPZCompMesh > fPressureFineMesh
computational mesh to contain the pressure elements
void HideTheElements()
put the elements in TPZSubCompMesh, group the elements and condense locally
void DeletePressureElements()
delete the pressure elements leaving the geometric mesh without pointing to the computational mesh ...
TPZMHMixedMeshControl(const TPZMHMixedMeshControl &copy)
class oriented towards the creation of multiscale hybrid meshes - YES
virtual void InsertPeriferalMaterialObjects()
Insert Boundary condition objects that do not perform any actual computation.
TPZAutoPointer< TPZCompMesh > fRotationMesh
computational mesh to contain the rotation elements
virtual void CreateInternalFluxElements()
void Print(std::ostream &out)
print the data structure
virtual void CreateSkeleton()
will create the elements on the skeleton
virtual void InsertPeriferalRotationMaterialObjects()
Insert the necessary Rotation material objects to create the flux mesh.
void SetLagrangeAveragePressure(bool flag)
Set the flag for creating Lagrange Dofs for the average pressure.
TPZAutoPointer< TPZCompMesh > FluxMesh()