ABLATE Source Documentation  0.12.33
ablate::domain::Region Class Reference

Public Member Functions

 Region (const std::string &name={}, int value=1)
 
const std::size_t & GetId () const
 
const std::string & GetName () const
 
const PetscInt & GetValue () const
 
std::string ToString () const
 
void CreateLabel (DM dm, DMLabel &regionLabel, PetscInt &regionValue) const
 
void GetLabel (DM dm, DMLabel &regionLabel, PetscInt &regionValue)
 
bool InRegion (DM dm, PetscInt point) const
 
void CheckForLabel (DM dm) const
 
void CheckForLabel (DM dm, MPI_Comm comm) const
 
bool operator== (const Region &otherRegion) const
 
bool operator< (const Region &otherRegion) const
 

Static Public Member Functions

static void GetLabel (const std::shared_ptr< Region > &region, DM dm, DMLabel &regionLabel, PetscInt &regionValue)
 
static bool InRegion (const std::shared_ptr< Region > &region, DM dm, PetscInt point)
 

Static Public Attributes

static const std::shared_ptr< RegionENTIREDOMAIN = {}
 

Constructor & Destructor Documentation

◆ Region()

ablate::domain::Region::Region ( const std::string &  name = {},
int  value = 1 
)
explicit

Create a region that includes the label name and value

Parameters
namelabel name
valuelabel value

Member Function Documentation

◆ CheckForLabel() [1/2]

void ablate::domain::Region::CheckForLabel ( DM  dm) const

throws exception if the label is not in the dm

Parameters
region
dm

◆ CheckForLabel() [2/2]

void ablate::domain::Region::CheckForLabel ( DM  dm,
MPI_Comm  comm 
) const

throws exception if the label is not in the dm on any rank

Parameters
region
dm

◆ CreateLabel()

void ablate::domain::Region::CreateLabel ( DM  dm,
DMLabel &  regionLabel,
PetscInt &  regionValue 
) const

create and returns a label/region value

Parameters
region
dm
regionLabel
regionValue

◆ GetLabel() [1/2]

void ablate::domain::Region::GetLabel ( const std::shared_ptr< Region > &  region,
DM  dm,
DMLabel &  regionLabel,
PetscInt &  regionValue 
)
static

static call to get a label from an optional region

Parameters
region
dm
regionLabel
regionValue

◆ GetLabel() [2/2]

void ablate::domain::Region::GetLabel ( DM  dm,
DMLabel &  regionLabel,
PetscInt &  regionValue 
)

call to get a label from an a region

Parameters
dm
regionLabel
regionValue

◆ InRegion() [1/2]

bool ablate::domain::Region::InRegion ( const std::shared_ptr< Region > &  region,
DM  dm,
PetscInt  point 
)
static

static call to see if a point is in region/or null

Parameters
region
dm
point
Returns

◆ InRegion() [2/2]

bool ablate::domain::Region::InRegion ( DM  dm,
PetscInt  point 
) const
inline

Non static call to see if this point is in a given region

Parameters
dm
point
Returns

◆ operator<()

bool ablate::domain::Region::operator< ( const Region otherRegion) const
inline

simple comparsion operator allowing regions to be used in a map

Parameters
otherRegion
Returns

◆ operator==()

bool ablate::domain::Region::operator== ( const Region otherRegion) const
inline

provide simple comparsion == operator

Returns

The documentation for this class was generated from the following files: