9 #ifndef __PZ__TPZMHMeshControl__ 10 #define __PZ__TPZMHMeshControl__ 126 fLagrangeAveragePressure(false),
127 fHybridize(false), fSwitchLagrangeSign(false), fGlobalSystemSize(-1), fGlobalSystemWithLocalCondensationSize(-1), fNumeq(-1)
133 fLagrangeAveragePressure(false),
134 fHybridize(false), fSwitchLagrangeSign(false), fGlobalSystemSize(-1), fGlobalSystemWithLocalCondensationSize(-1), fNumeq(-1)
176 fInterfaces = skeleton;
179 for (
auto it = fInterfaces.begin(); it != fInterfaces.end(); it++) {
180 if (fMHMtoSubCMesh.find(it->second.first) == fMHMtoSubCMesh.end()) {
183 if (it->second.second != it->first && fMHMtoSubCMesh.find(it->second.second) == fMHMtoSubCMesh.end()) {
200 fProblemType = problem;
219 fpOrderInternal = order;
225 fpOrderSkeleton = order;
231 fHdivmaismais = order;
238 fLagrangeAveragePressure = flag;
269 fSwitchLagrangeSign = sw;
273 void Print(std::ostream &out);
284 meshvec[0] = fPressureFineMesh.operator->();
285 meshvec[1] = fCMeshLagrange.operator->();
286 meshvec[2] = fCMeshConstantPressure.operator->();
353 bool IsSibling(int64_t son, int64_t father);
387 return fMaterialBCIds.find(matid) != fMaterialBCIds.end();
425 void ConnectedElements(int64_t skeleton, std::pair<int64_t,int64_t> &leftright, std::map<int64_t, std::list<TPZCompElSide> > &ellist);
429 void ConnectedInterfaceElements(int64_t skeleton, std::pair<int64_t,int64_t> &leftright, std::map<int64_t, std::list<TPZInterfaceElement *> > &ellist);
void CheckDivisionConsistency(TPZGeoElSide gelside)
void AddElementBoundaries(int64_t elseed, int64_t compelindex, TPZStack< TPZCompElSide > &result)
put the element side which face the boundary on the stack
bool fLagrangeAveragePressure
flag to determine whether a lagrange multiplier is included to force zero average pressures in the su...
void ConnectedInterfaceElements(int64_t skeleton, std::pair< int64_t, int64_t > &leftright, std::map< int64_t, std::list< TPZInterfaceElement *> > &ellist)
identify interface elements connected to the skeleton elements
TPZAutoPointer< TPZCompMesh > fCMeshLagrange
computational mesh to represent the distributed flux in each subdomain
TPZAutoPointer< TPZCompMesh > PressureMesh()
MProblemType
Specify the type of differential equation.
TPZAutoPointer< TPZCompMesh > fCMesh
computational MHM mesh being built by this class
bool IsSibling(int64_t son, int64_t father)
verify if the element is a sibling of
TPZVec< TPZAutoPointer< TPZCompMesh > > GetMeshes()
void CreateSkeleton()
will create the elements on the skeleton
void DefineSkeleton(std::map< int64_t, std::pair< int64_t, int64_t > > &skeleton)
virtual void resize(const int64_t newsize)
TPZManVector< int64_t > GetGeoToMHMDomain()
virtual void SetHybridize(bool flag=true)
Set the hybridization to true.
TPZAutoPointer< TPZGeoMesh > GMesh() const
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
virtual bool GetHybridize()
Contains declaration of TPZCompEl class which defines the interface of a computational element...
int fSecondSkeletonMatId
material id associated with the skeleton elements
int fSkeletonMatId
material id associated with the skeleton elements
TPZMHMeshControl & operator=(const TPZMHMeshControl &cp)
int64_t fGlobalSystemSize
number of equations when not condensing anything
void PrintBoundaryInfo(std::ostream &out)
print the indices of the boundary elements and interfaces
void BuildWrapMesh(int dim)
Create the wrap elements.
int64_t WhichSubdomain(TPZCompEl *cel)
returns to which subdomain a given element beint64_ts
std::set< int > fMaterialIds
materials used for modeling the differential equation
bool fHybridize
flag to indicate whether we create a hybridized mesh
std::set< int > fMaterialBCIds
materials for boundary conditions
Utility class which represents an element with its side. The Geometric approximation classes Geometry...
void DivideBoundarySkeletonElements()
divide the boundary skeleton elements
void DivideSkeletonElements(int ndivide)
divide the skeleton elements
int fpOrderInternal
interpolation order of the internal elements
void DefinePartition(TPZVec< int64_t > &partitionindex, std::map< int64_t, std::pair< int64_t, int64_t > > &skeleton)
Define the partitioning information of the MHM mesh.
int WrapMaterialId(TPZGeoElSide gelside)
Return the wrap material id (depends on being boundary, neighbour of skeleton or interior.
int fSkeletonWrapMatId
material index of the skeleton wrap
std::map< TPZCompMesh *, TPZManVector< int64_t > > fConnectToSubDomainIdentifier
geometric index of the connects - subdomain where the connect will be internal
void CreateInternalElements()
will create the internal elements, one coarse element at a time
void TransferToMultiphysics()
transform the computational mesh into a multiphysics mesh
void SetDimension(int dim)
Set Dimension.
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
virtual bool IsSkeletonMatid(int matid)
Return true if the material id is related to a skeleton.
void SetProblemType(MProblemType problem)
Set the problem type of the simulation.
void SetDefaultOrder(int order)
TPZManVector< int64_t > fGeoToMHMDomain
vector of coarse domain index associated with each geometric element
void SetHdivmaismaisPOrder(int order)
int fPressureSkeletonMatId
material id associated with the skeleton elements in a hybrid context
void SetSkeletonPOrder(int order)
std::map< int64_t, int64_t > & Coarse_to_Submesh()
return the coarseindex to submesh index data structure
void SwitchLagrangeMultiplierSign(bool sw)
switch the sign of the lagrange multipliers
int fInternalWrapMatId
material index of the internal wrap
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...
void CreateInterfaceElements2()
void AddBoundaryInterfaceElements()
Add the boundary interface elements to the computational mesh.
int fLagrangeMatIdLeft
material id associated with the lagrange multiplier elements
Contains declaration of TPZMesh class which defines a geometrical mesh and contains a corresponding l...
virtual void BuildComputationalMesh(bool usersubstructure)
Create all data structures for the computational mesh.
bool fSwitchLagrangeSign
flag to indicate whether the lagrange multipliers should switch signal
void PrintDiagnostics(std::ostream &out)
Print diagnostics.
virtual void CheckMeshConsistency()
verify the consistency of the datastructure
virtual void InsertPeriferalMaterialObjects()
Insert material objects that do not perform any actual computation.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
void PrintSubdomain(int64_t elindex, std::ostream &out)
print the diagnostics for a subdomain
int fBoundaryWrapMatId
material index of the boundary wrap
#define DebugStop()
Returns a message to user put a breakpoint in.
void DivideWrap(TPZGeoEl *wrapelement)
Divide the wrap element while it has divided neighbours.
void AddBoundaryElements()
Add the boundary elements to the computational mesh.
void DefinePartitionbyCoarseIndices(TPZVec< int64_t > &coarseindices)
Define the MHM partition by the coarse element indices.
void CreateInterfaceElements()
will create the interface elements between the internal elements and the skeleton ...
void SetInternalPOrder(int order)
Set the porder for the internal elements.
TPZAutoPointer< TPZCompMesh > fCMeshConstantPressure
computational mesh to represent the constant states
void GetMeshVec(TPZVec< TPZCompMesh *> &meshvec)
Put the pointers to the meshes in a vector.
TPZAutoPointer< TPZCompMesh > fPressureFineMesh
computational mesh to contain the pressure elements
std::map< int64_t, int64_t > fMHMtoSubCMesh
indices of the geometric elements which define the skeleton mesh and their corresponding subcmesh ind...
void Print(std::ostream &out)
print the data structure
TPZAutoPointer< TPZGeoMesh > fGMesh
geometric mesh used to create the computational mesh
Contains declaration of TPZCompMesh class which is a repository for computational elements...
virtual void CreateSkeletonElements()
will create dim-1 geometric elements on the interfaces between the coarse element indices ...
void CreateLagrangeMultiplierMesh()
create the lagrange multiplier mesh, one element for each subdomain
void ConnectedElements(int64_t skeleton, std::pair< int64_t, int64_t > &leftright, std::map< int64_t, std::list< TPZCompElSide > > &ellist)
identify connected elements to the skeleton elements
virtual void HybridizeSkeleton(int skeletonmatid, int pressurematid)
int fNState
number of state variables
class oriented towards the creation of multiscale hybrid meshes - YES
void SetSubdomain(TPZCompEl *cel, int64_t subdomain)
associates the connects of an element with a subdomain
int64_t fGlobalSystemWithLocalCondensationSize
number of equations considering local condensation
This class implements a geometric mesh for the pz environment. Geometry.
MProblemType fProblemType
Variable defining the type of problem.
Implements computational mesh. Computational Mesh.
virtual bool IsBoundaryMatid(int matid)
return true if the material id is related to a boundary
TPZCompMesh * CriaMalhaTemporaria()
will create a computational mesh using the coarse element indexes and its interface elements ...
void CreateWrap(TPZGeoElSide gelside)
CreateWrapMesh of a given material id.
TPZAutoPointer< TPZCompMesh > CMesh() const
int fpOrderSkeleton
interpolation order of the skeleton elements
int64_t fNumeq
number of equations of the global system
void JoinSubdomains(TPZVec< TPZCompMesh *> &meshvec, TPZCompMesh *multiphysicsmesh)
Subdomains are identified by computational mesh, this method will join.
std::map< int64_t, std::pair< int64_t, int64_t > > fInterfaces
indices of the skeleton elements and their left/right partition indexes
Defines the interface of a computational element. Computational Element.
TPZMHMeshControl(int dimension)
int HasWrapNeighbour(TPZGeoElSide gelside)
Verify if the element side contains a wrap neighbour.
void SubStructure()
substructure the mesh
void SetLagrangeAveragePressure(bool flag)
Set the flag for creating Lagrange Dofs for the average pressure.
virtual ~TPZMHMeshControl()