Serac  0.1
Serac is an implicit thermal strucural mechanics simulation code.
Classes | Namespaces | Functions
domain.hpp File Reference

many of the functions in this file amount to extracting element indices from an mesh_t like More...

#include <cstdlib>
#include <vector>
#include <array>
#include <cstdint>
#include <functional>
#include <map>
#include <set>
#include "mfem.hpp"
#include "serac/numerics/functional/tensor.hpp"
#include "serac/numerics/functional/finite_element.hpp"
#include "serac/numerics/functional/element_restriction.hpp"
#include "serac/numerics/functional/typedefs.hpp"
Include dependency graph for domain.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  serac::Domain
 a class for representing a geometric region that can be used for integration More...
 

Namespaces

 serac
 Accelerator functionality.
 

Functions

Domain serac::EntireDomain (const mesh_t &mesh)
 constructs a domain from all the elements in a mesh
 
Domain serac::EntireBoundary (const mesh_t &mesh)
 constructs a domain from all the boundary elements in a mesh
 
Domain serac::InteriorFaces (const mesh_t &mesh)
 constructs a domain from all the interior face elements in a mesh
 
Domain serac::operator| (const Domain &a, const Domain &b)
 create a new domain that is the union of a and b
 
Domain serac::operator& (const Domain &a, const Domain &b)
 create a new domain that is the intersection of a and b
 
Domain serac::operator- (const Domain &a, const Domain &b)
 create a new domain that is the set difference of a and b
 
template<int dim>
auto serac::by_attr (int value)
 convenience predicate for creating domains by attribute
 
template<int dim>
auto serac::by_attr (std::set< int > values)
 convenience predicate for creating domains by a set of attributes
 
std::array< uint32_t, mfem::Geometry::NUM_GEOMETRIES > serac::geometry_counts (const Domain &domain)
 count the number of elements of each geometry in a domain More...
 
template<int dim>
tensor< double, dim > serac::average (std::vector< tensor< double, dim >> &positions)
 convenience function for computing the arithmetic mean of some list of vectors
 

Detailed Description

many of the functions in this file amount to extracting element indices from an mesh_t like

mfem::Geometry mfem element id tri id quad id
Triangle 0 0
Triangle 1 1
Square 2 0
Triangle 3 2
Square 4 1
Square 5 2
Square 6 3

and then evaluating a predicate function to decide whether that element gets added to a given Domain.

Definition in file domain.hpp.