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

This file contains the declaration of structure that manages the MFEM objects that make up the state for a given field. More...

#include <functional>
#include <memory>
#include <optional>
#include <type_traits>
#include <utility>
#include "mfem.hpp"
#include "serac/infrastructure/variant.hpp"
#include "serac/physics/state/finite_element_vector.hpp"
#include "serac/numerics/functional/domain.hpp"
#include "serac/numerics/functional/tensor.hpp"
Include dependency graph for finite_element_state.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  serac::FiniteElementState
 Class for encapsulating the critical MFEM components of a primal finite element field. More...
 

Namespaces

 serac
 Accelerator functionality.
 

Typedefs

template<typename T >
using serac::detail::first_argument = std::decay_t< decltype(first_argument_helper(std::declval< T >()))>
 

Functions

template<int dim>
void serac::detail::setMfemVectorFromTensorOrDouble (mfem::Vector &v_mfem, const tensor< double, dim > &v)
 Helper function to copy a tensor into an mfem Vector.
 
void serac::detail::setMfemVectorFromTensorOrDouble (mfem::Vector &v_mfem, double v)
 Helper function to copy a double into a singleton mfem Vector.
 
template<typename Ret , typename Arg , typename... Rest>
Arg serac::detail::first_argument_helper (Ret(*)(Arg, Rest...))
 Helper for extracting type of first argument of a free function.
 
template<typename Ret , typename F , typename Arg , typename... Rest>
Arg serac::detail::first_argument_helper (Ret(F::*)(Arg, Rest...))
 Helper for extracting type of first argument of a class method. More...
 
template<typename Callable >
auto serac::detail::evaluateTensorFunctionOnMfemVector (const mfem::Vector &X_mfem, Callable &&f)
 Evaluate a function of a tensor with an mfem Vector object.
 
bool serac::is_scalar_valued (const GeneralCoefficient &coef)
 convenience function for querying the type stored in a GeneralCoefficient
 
bool serac::is_vector_valued (const GeneralCoefficient &coef)
 convenience function for querying the type stored in a GeneralCoefficient
 
double serac::norm (const FiniteElementState &state, const double p=2)
 Find the Lp norm of a finite element state across all dofs. More...
 
double serac::computeL2Error (const FiniteElementState &state, mfem::VectorCoefficient &exact_solution)
 Find the L2 norm of the error of a vector-valued finite element state with respect to an exact solution. More...
 
double serac::computeL2Error (const FiniteElementState &state, mfem::Coefficient &exact_solution)
 Find the L2 norm of the error of a scalar-valued finite element state with respect to an exact solution. More...
 

Variables

template<typename F >
decltype(first_argument_helper(&F::operator())) serac::detail::first_argument_helper (F)
 

Detailed Description

This file contains the declaration of structure that manages the MFEM objects that make up the state for a given field.

Definition in file finite_element_state.hpp.

Typedef Documentation

◆ first_argument

template<typename T >
using serac::detail::first_argument = typedef std::decay_t<decltype(first_argument_helper(std::declval<T>()))>

Extract type of first argument of a free callable

Definition at line 78 of file finite_element_state.hpp.

Function Documentation

◆ first_argument_helper()

template<typename Ret , typename F , typename Arg , typename... Rest>
Arg serac::detail::first_argument_helper ( Ret(F::*)(Arg, Rest...)  )

Helper for extracting type of first argument of a class method.

Helper for extracting type of first argument of a const class method.

Variable Documentation

◆ first_argument_helper

template<typename F >
decltype(first_argument_helper(&F::operator())) serac::detail::first_argument_helper(F) ( )

Extract type of first argument of a class method

Definition at line 72 of file finite_element_state.hpp.