Serac  0.1
Serac is an implicit thermal strucural mechanics simulation code.
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
serac::Domain Struct Reference

a class for representing a geometric region that can be used for integration More...

#include <domain.hpp>

Public Types

enum  Type { Elements , BoundaryElements }
 enum describing what kind of elements are included in a Domain
 

Public Member Functions

 Domain (const mfem::Mesh &m, int d, Type type=Domain::Type::Elements)
 
const std::vector< int > & get (mfem::Geometry::Type geom) const
 get elements by geometry type
 

Static Public Member Functions

static Domain ofVertices (const mfem::Mesh &mesh, std::function< bool(vec2)> func)
 create a domain from some subset of the vertices in an mfem::Mesh More...
 
static Domain ofVertices (const mfem::Mesh &mesh, std::function< bool(vec3)> func)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
static Domain ofEdges (const mfem::Mesh &mesh, std::function< bool(std::vector< vec2 >, int)> func)
 create a domain from some subset of the edges in an mfem::Mesh More...
 
static Domain ofEdges (const mfem::Mesh &mesh, std::function< bool(std::vector< vec3 >)> func)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
static Domain ofFaces (const mfem::Mesh &mesh, std::function< bool(std::vector< vec2 >, int)> func)
 create a domain from some subset of the faces in an mfem::Mesh More...
 
static Domain ofFaces (const mfem::Mesh &mesh, std::function< bool(std::vector< vec3 >, int)> func)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
static Domain ofElements (const mfem::Mesh &mesh, std::function< bool(std::vector< vec2 >, int)> func)
 create a domain from some subset of the elements (spatial dim == geometry dim) in an mfem::Mesh More...
 
static Domain ofElements (const mfem::Mesh &mesh, std::function< bool(std::vector< vec3 >, int)> func)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
static Domain ofBoundaryElements (const mfem::Mesh &mesh, std::function< bool(std::vector< vec2 >, int)> func)
 create a domain from some subset of the boundary elements (spatial dim == geometry dim + 1) in an mfem::Mesh More...
 
static Domain ofBoundaryElements (const mfem::Mesh &mesh, std::function< bool(std::vector< vec3 >, int)> func)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Public Attributes

const mfem::Mesh & mesh_
 the underyling mesh for this domain
 
int dim_
 the geometric dimension of the domain
 
Type type_
 whether the elements in this domain are on the boundary or not
 

Static Public Attributes

static constexpr int num_types = 2
 the number of entries in the Type enum
 

Detailed Description

a class for representing a geometric region that can be used for integration

This region can be an entire mesh or some subset of its elements

Definition at line 21 of file domain.hpp.

Constructor & Destructor Documentation

◆ Domain()

serac::Domain::Domain ( const mfem::Mesh &  m,
int  d,
Type  type = Domain::Type::Elements 
)
inline

note: only lists with appropriate dimension (see dim_) will be populated for example, a 2D Domain may have tri_ids_ and quad_ids_ non-nonempty, but all other lists will be empty

these lists hold indices into the "E-vector" of the appropriate geometry

Definition at line 55 of file domain.hpp.

Member Function Documentation

◆ ofBoundaryElements()

Domain serac::Domain::ofBoundaryElements ( const mfem::Mesh &  mesh,
std::function< bool(std::vector< vec2 >, int)>  func 
)
static

create a domain from some subset of the boundary elements (spatial dim == geometry dim + 1) in an mfem::Mesh

Parameters
meshthe entire mesh
funcpredicate function for determining which boundary elements will be included in this domain

Definition at line 367 of file domain.cpp.

◆ ofEdges()

Domain serac::Domain::ofEdges ( const mfem::Mesh &  mesh,
std::function< bool(std::vector< vec2 >, int)>  func 
)
static

create a domain from some subset of the edges in an mfem::Mesh

Parameters
meshthe entire mesh
funcpredicate function for determining which edges will be included in this domain. The function's arguments are the list of vertex coordinates and an attribute index (if appropriate).

Definition at line 132 of file domain.cpp.

◆ ofElements()

Domain serac::Domain::ofElements ( const mfem::Mesh &  mesh,
std::function< bool(std::vector< vec2 >, int)>  func 
)
static

create a domain from some subset of the elements (spatial dim == geometry dim) in an mfem::Mesh

Parameters
meshthe entire mesh
funcpredicate function for determining which elements will be included in this domain. The function's arguments are the list of vertex coordinates and an attribute index (if appropriate).

Definition at line 290 of file domain.cpp.

◆ ofFaces()

Domain serac::Domain::ofFaces ( const mfem::Mesh &  mesh,
std::function< bool(std::vector< vec2 >, int)>  func 
)
static

create a domain from some subset of the faces in an mfem::Mesh

Parameters
meshthe entire mesh
funcpredicate function for determining which faces will be included in this domain. The function's arguments are the list of vertex coordinates and an attribute index (if appropriate).

Definition at line 213 of file domain.cpp.

◆ ofVertices()

Domain serac::Domain::ofVertices ( const mfem::Mesh &  mesh,
std::function< bool(vec2)>  func 
)
static

create a domain from some subset of the vertices in an mfem::Mesh

Parameters
meshthe entire mesh
funcpredicate function for determining which vertices will be included in this domain. The function's argument is the spatial position of the vertex.

Definition at line 79 of file domain.cpp.


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