Smith  0.1
Smith is an implicit thermal structural 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 "smith/numerics/functional/tensor.hpp"
#include "smith/numerics/functional/finite_element.hpp"
#include "smith/numerics/functional/element_restriction.hpp"
#include "smith/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  smith::Domain
 a class for representing a geometric region that can be used for integration More...
 

Namespaces

 smith
 Accelerator functionality.
 

Functions

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