NeoPZ
|
#include <TPZHybridizeHDiv.h>
Public Member Functions | |
TPZHybridizeHDiv ()=default | |
TPZHybridizeHDiv (TPZVec< TPZCompMesh *> &meshvec_Hybrid) | |
void | ComputeNState (TPZVec< TPZCompMesh *> &meshvec_Hybrid) |
void | ComputePeriferalMaterialIds (TPZVec< TPZCompMesh *> &meshvec_Hybrid) |
compute material ids for the periferal material objects More... | |
void | SetPeriferalMaterialIds (int HDivWrapMatid, int LagrangeInterface, int InterfaceMatid) |
set the periferal material ids More... | |
bool | IsPeriferalMaterialId (int matid) |
return true if a material id is a peripheral material More... | |
void | HybridizeInternalSides (TPZVec< TPZCompMesh *> &meshvec_Hybrid) |
split the connects between flux elements and create a dim-1 pressure element More... | |
void | CreateInterfaceElements (TPZCompMesh *cmesh_Hybrid, TPZVec< TPZCompMesh *> &meshvec_Hybrid) |
Create interface elements with material id InterfaceMatid. More... | |
void | CreateInterfaceElements (TPZMultiphysicsCompMesh *cmesh_Hybrid) |
TPZCompMesh * | CreateMultiphysicsMesh (TPZCompMesh *cmesh_HDiv, TPZVec< TPZCompMesh *> &meshvec_Hybrid, double Lagrange_term_multiplier=1.) |
create a multiphysics mesh for the hybrid formulation using the materials of another mesh and the given atomic meshes More... | |
TPZCompMesh * | CreateMultiphysicsMesh (TPZMultiphysicsCompMesh *cmesh_HDiv, double Lagrange_term_multiplier=1.) |
create a multiphysics hybridized mesh based on and input mesh More... | |
void | ReCreateMultiphysicsMesh (TPZMultiphysicsCompMesh *cmesh_HDiv, double Lagrange_term_multiplier=1.) |
create a multiphysics hybridized mesh based on and input mesh More... | |
void | InsertPeriferalMaterialObjects (TPZVec< TPZCompMesh *> &meshvec_Hybrid) |
insert the material objects for HDivWrap and LagrangeInterface in the atomic meshes More... | |
void | InsertPeriferalMaterialObjects (TPZCompMesh *cmesh_Hybrid, double Lagrange_term_multiplier=1.) |
insert the material objects for HDivWrap, LagrangeInterface and InterfaceMatid in the multiphysics mesh More... | |
std::tuple< TPZCompMesh *, TPZVec< TPZCompMesh * > > | Hybridize (TPZCompMesh *cmesh_Multiphysics, TPZVec< TPZCompMesh *> &meshvec_HDiv, bool group_elements=true, double Lagrange_term_multiplier=1.) |
clones the atomic meshes in meshvec_HDiv and creates a multiphysics hybrid mesh More... | |
TPZMultiphysicsCompMesh * | Hybridize (TPZMultiphysicsCompMesh *multiphysics, bool group_elements=true, double Lagrange_term_multiplier=1.) |
make a hybrid mesh from a H(div) multiphysics mesh More... | |
void | HybridizeGivenMesh (TPZMultiphysicsCompMesh &multiphysics, bool group_elements=true, double Lagrange_term_multiplier=1.) |
make a hybrid mesh from a H(div) multiphysics mesh More... | |
Static Public Member Functions | |
static void | AssociateElements (TPZCompMesh *cmesh, TPZVec< int64_t > &elementgroup) |
Associate elements with a volumetric element. More... | |
static void | GroupandCondenseElements (TPZCompMesh *cmesh_Hybrid) |
group and condense the elements More... | |
static void | VerifySolutionConsistency (TPZCompMesh *fluxmesh, std::ostream &out) |
verify the consistency of the solution of the flux mesh More... | |
static TPZCompElSide | RightElement (TPZInterpolatedElement *intel, int side) |
find an element which shares the connect and has the same dimension More... | |
Public Attributes | |
int | fHDivWrapMatid |
int | fLagrangeInterface |
int | fInterfaceMatid |
int | fNState |
Private Member Functions | |
std::tuple< int64_t, int > | SplitConnects (const TPZCompElSide &left, const TPZCompElSide &right, TPZVec< TPZCompMesh *> &meshvec_Hybrid) |
split the connect between two neighbouring elements More... | |
Definition at line 23 of file TPZHybridizeHDiv.h.
|
default |
TPZHybridizeHDiv::TPZHybridizeHDiv | ( | TPZVec< TPZCompMesh *> & | meshvec_Hybrid | ) |
Definition at line 33 of file TPZHybridizeHDiv.cpp.
|
static |
Associate elements with a volumetric element.
Definition at line 417 of file TPZHybridizeHDiv.cpp.
References DebugStop, TPZCompMesh::Dimension(), TPZCompMesh::ElementVec(), TPZVec< T >::Fill(), TPZCompMesh::NConnects(), TPZCompMesh::NElements(), and TPZVec< T >::Resize().
Referenced by IsPeriferalMaterialId().
void TPZHybridizeHDiv::ComputeNState | ( | TPZVec< TPZCompMesh *> & | meshvec_Hybrid | ) |
Definition at line 38 of file TPZHybridizeHDiv.cpp.
References TPZVec< T >::begin(), and TPZVec< T >::size().
void TPZHybridizeHDiv::ComputePeriferalMaterialIds | ( | TPZVec< TPZCompMesh *> & | meshvec_Hybrid | ) |
compute material ids for the periferal material objects
Definition at line 44 of file TPZHybridizeHDiv.cpp.
References TPZGeoMesh::Element(), TPZGeoEl::MaterialId(), TPZGeoMesh::NElements(), and TPZGeoMesh::Reference().
void TPZHybridizeHDiv::CreateInterfaceElements | ( | TPZCompMesh * | cmesh_Hybrid, |
TPZVec< TPZCompMesh *> & | meshvec_Hybrid | ||
) |
Create interface elements with material id InterfaceMatid.
Definition at line 295 of file TPZHybridizeHDiv.cpp.
References TPZGeoElBC::CreatedElement(), DebugStop, TPZCompMesh::Dimension(), TPZGeoEl::Dimension(), TPZGeoElSide::Element(), TPZCompMesh::Element(), TPZGeoElSide::EqualLevelCompElementList(), TPZCompMesh::InitializeBlock(), TPZCompMesh::LoadReferences(), TPZCompEl::NConnects(), TPZGeoElSide::Neighbour(), TPZCompMesh::NElements(), TPZGeoEl::NSides(), TPZCompEl::Reference(), TPZCompMesh::Reference(), TPZGeoEl::Reference(), TPZGeoElSide::Reference(), TPZCompElSide::Reference(), and TPZGeoMesh::ResetReference().
Referenced by IsPeriferalMaterialId().
void TPZHybridizeHDiv::CreateInterfaceElements | ( | TPZMultiphysicsCompMesh * | cmesh_Hybrid | ) |
Create interface elements with material id InterfaceMatid using the first and second meshes
Definition at line 365 of file TPZHybridizeHDiv.cpp.
References TPZMultiphysicsCompMesh::MeshVector().
TPZCompMesh * TPZHybridizeHDiv::CreateMultiphysicsMesh | ( | TPZCompMesh * | cmesh_HDiv, |
TPZVec< TPZCompMesh *> & | meshvec_Hybrid, | ||
double | Lagrange_term_multiplier = 1. |
||
) |
create a multiphysics mesh for the hybrid formulation using the materials of another mesh and the given atomic meshes
Definition at line 370 of file TPZHybridizeHDiv.cpp.
References TPZBuildMultiphysicsMesh::AddConnects(), TPZBuildMultiphysicsMesh::AddElements(), TPZCompMesh::ApproxSpace(), TPZCompMesh::AutoBuild(), TPZCompMesh::CopyMaterials(), TPZCompMesh::LoadReferences(), TPZCompMesh::Reference(), and TPZCreateApproximationSpace::SetAllCreateFunctionsMultiphysicElem().
Referenced by IsPeriferalMaterialId().
TPZCompMesh * TPZHybridizeHDiv::CreateMultiphysicsMesh | ( | TPZMultiphysicsCompMesh * | cmesh_HDiv, |
double | Lagrange_term_multiplier = 1. |
||
) |
create a multiphysics hybridized mesh based on and input mesh
Definition at line 384 of file TPZHybridizeHDiv.cpp.
References TPZMultiphysicsCompMesh::BuildMultiphysicsSpace(), TPZCompMesh::CopyMaterials(), TPZMultiphysicsCompMesh::MeshVector(), TPZCompMesh::Reference(), and TPZVec< T >::size().
|
static |
group and condense the elements
compute a groupnumber associated with each element
Definition at line 474 of file TPZHybridizeHDiv.cpp.
References TPZElementGroup::AddElement(), TPZCompMesh::ComputeNodElCon(), cond, TPZCompMesh::Element(), TPZCompMesh::NElements(), and TPZCondensedCompEl::SetKeepMatrix().
Referenced by IsPeriferalMaterialId().
std::tuple< TPZCompMesh *, TPZVec< TPZCompMesh * > > TPZHybridizeHDiv::Hybridize | ( | TPZCompMesh * | cmesh_Multiphysics, |
TPZVec< TPZCompMesh *> & | meshvec_HDiv, | ||
bool | group_elements = true , |
||
double | Lagrange_term_multiplier = 1. |
||
) |
clones the atomic meshes in meshvec_HDiv and creates a multiphysics hybrid mesh
insert the material objects for HDivWrap and LagrangeInterface
Definition at line 574 of file TPZHybridizeHDiv.cpp.
References TPZVec< T >::size().
Referenced by IsPeriferalMaterialId().
TPZMultiphysicsCompMesh * TPZHybridizeHDiv::Hybridize | ( | TPZMultiphysicsCompMesh * | multiphysics, |
bool | group_elements = true , |
||
double | Lagrange_term_multiplier = 1. |
||
) |
make a hybrid mesh from a H(div) multiphysics mesh
Definition at line 593 of file TPZHybridizeHDiv.cpp.
References DebugStop, and TPZMultiphysicsCompMesh::MeshVector().
void TPZHybridizeHDiv::HybridizeGivenMesh | ( | TPZMultiphysicsCompMesh & | multiphysics, |
bool | group_elements = true , |
||
double | Lagrange_term_multiplier = 1. |
||
) |
make a hybrid mesh from a H(div) multiphysics mesh
Definition at line 612 of file TPZHybridizeHDiv.cpp.
References TPZMultiphysicsCompMesh::MeshVector().
Referenced by IsPeriferalMaterialId().
void TPZHybridizeHDiv::HybridizeInternalSides | ( | TPZVec< TPZCompMesh *> & | meshvec_Hybrid | ) |
split the connects between flux elements and create a dim-1 pressure element
Definition at line 232 of file TPZHybridizeHDiv.cpp.
References TPZCompMesh::ApproxSpace(), TPZCompMesh::ComputeNodElCon(), TPZCompEl::Connect(), TPZCreateApproximationSpace::CreateCompEl(), DebugStop, TPZGeoMesh::Dimension(), TPZGeoEl::Dimension(), TPZGeoMesh::Element(), TPZCompMesh::Element(), TPZCompMesh::InitializeBlock(), TPZCompMesh::LoadReferences(), TPZCompEl::NConnects(), TPZGeoEl::NCornerNodes(), TPZCompMesh::NElements(), TPZGeoEl::NSides(), TPZInterpolatedElement::PRefine(), TPZCompEl::Reference(), TPZCompMesh::Reference(), TPZGeoMesh::ResetReference(), TPZGeoEl::ResetReference(), TPZCompElDisc::SetDegree(), TPZCompMesh::SetDimModel(), TPZConnect::SetLagrangeMultiplier(), TPZCompElDisc::SetTrueUseQsiEta(), and TPZGeoEl::SideDimension().
Referenced by IsPeriferalMaterialId().
void TPZHybridizeHDiv::InsertPeriferalMaterialObjects | ( | TPZVec< TPZCompMesh *> & | meshvec_Hybrid | ) |
insert the material objects for HDivWrap and LagrangeInterface in the atomic meshes
Definition at line 512 of file TPZHybridizeHDiv.cpp.
References DebugStop, TPZCompMesh::Dimension(), TPZCompMesh::FindMaterial(), and TPZCompMesh::InsertMaterialObject().
Referenced by IsPeriferalMaterialId().
void TPZHybridizeHDiv::InsertPeriferalMaterialObjects | ( | TPZCompMesh * | cmesh_Hybrid, |
double | Lagrange_term_multiplier = 1. |
||
) |
insert the material objects for HDivWrap, LagrangeInterface and InterfaceMatid in the multiphysics mesh
Definition at line 543 of file TPZHybridizeHDiv.cpp.
References DebugStop, TPZCompMesh::Dimension(), TPZCompMesh::FindMaterial(), TPZCompMesh::InsertMaterialObject(), and TPZLagrangeMultiplier::SetMultiplier().
|
inline |
return true if a material id is a peripheral material
Definition at line 53 of file TPZHybridizeHDiv.h.
References AssociateElements(), CreateInterfaceElements(), CreateMultiphysicsMesh(), fInterfaceMatid, GroupandCondenseElements(), Hybridize(), HybridizeGivenMesh(), HybridizeInternalSides(), InsertPeriferalMaterialObjects(), ReCreateMultiphysicsMesh(), RightElement(), SplitConnects(), and VerifySolutionConsistency().
void TPZHybridizeHDiv::ReCreateMultiphysicsMesh | ( | TPZMultiphysicsCompMesh * | cmesh_HDiv, |
double | Lagrange_term_multiplier = 1. |
||
) |
create a multiphysics hybridized mesh based on and input mesh
Definition at line 403 of file TPZHybridizeHDiv.cpp.
References TPZMultiphysicsCompMesh::BuildMultiphysicsSpace(), TPZMultiphysicsCompMesh::GetActiveApproximationSpaces(), and TPZMultiphysicsCompMesh::MeshVector().
Referenced by IsPeriferalMaterialId().
|
static |
find an element which shares the connect and has the same dimension
if the side is restrained we will hybridize between the element and the larger element
we assume that a larger element should not be a boundary element
Definition at line 190 of file TPZHybridizeHDiv.cpp.
References DebugStop, TPZGeoEl::Dimension(), TPZCompElSide::Element(), TPZGeoElSide::EqualLevelCompElementList(), TPZConnect::HasDependency(), TPZGeoElSide::LowerLevelCompElementList2(), TPZCompEl::Reference(), TPZInterpolatedElement::SideConnect(), and TPZVec< T >::size().
Referenced by IsPeriferalMaterialId().
|
inline |
set the periferal material ids
Definition at line 44 of file TPZHybridizeHDiv.h.
|
private |
split the connect between two neighbouring elements
Definition at line 76 of file TPZHybridizeHDiv.cpp.
References TPZCompMesh::AllocateNewConnect(), TPZCompMesh::ApproxSpace(), TPZCompMesh::ConnectVec(), TPZCreateApproximationSpace::CreateCompEl(), TPZGeoElBC::CreatedElement(), DebugStop, TPZConnect::DecrementElConnected(), TPZCompMesh::Dimension(), TPZGeoEl::Dimension(), TPZCompElSide::Element(), TPZConnect::HasDependency(), TPZConnect::IncrementElConnected(), TPZGeoEl::Index(), TPZCompEl::LoadElementReference(), TPZCompMesh::NConnects(), TPZGeoEl::NSides(), TPZConnect::Order(), TPZCompEl::Reference(), TPZCompElSide::Reference(), TPZConnect::RemoveDepend(), TPZConnect::ResetElConnected(), TPZGeoEl::ResetReference(), TPZInterpolatedElement::SetConnectIndex(), TPZCompMesh::SetDefaultOrder(), TPZInterpolatedElement::SetPreferredOrder(), TPZConnect::SetSequenceNumber(), TPZInterpolationSpace::SetSideOrient(), TPZCompElSide::Side(), TPZInterpolatedElement::SideConnect(), TPZInterpolatedElement::SideConnectLocId(), and TPZVec< T >::size().
Referenced by IsPeriferalMaterialId().
|
static |
verify the consistency of the solution of the flux mesh
Definition at line 683 of file TPZHybridizeHDiv.cpp.
References CompareFluxes(), DebugStop, TPZCompMesh::Dimension(), TPZGeoEl::Dimension(), TPZCompMesh::Element(), TPZGeoElSide::EqualLevelCompElementList(), TPZCompMesh::LoadReferences(), TPZGeoElSide::LowerLevelCompElementList2(), TPZCompMesh::NElements(), TPZGeoEl::NSides(), TPZStack< T, NumExtAlloc >::push_back(), TPZCompEl::Reference(), TPZCompMesh::Reference(), TPZGeoElSide::Reference(), TPZCompElSide::Reference(), TPZGeoMesh::ResetReference(), TPZGeoEl::SideDimension(), and TPZVec< T >::size().
Referenced by IsPeriferalMaterialId().
int TPZHybridizeHDiv::fHDivWrapMatid |
Definition at line 26 of file TPZHybridizeHDiv.h.
int TPZHybridizeHDiv::fInterfaceMatid |
Definition at line 30 of file TPZHybridizeHDiv.h.
Referenced by IsPeriferalMaterialId().
int TPZHybridizeHDiv::fLagrangeInterface |
Definition at line 28 of file TPZHybridizeHDiv.h.
int TPZHybridizeHDiv::fNState |
Definition at line 32 of file TPZHybridizeHDiv.h.