Smith  0.1
Smith is an implicit thermal structural mechanics simulation code.
Classes | Namespaces | Typedefs | Functions
field_state.hpp File Reference
#include "gretl/data_store.hpp"
#include "gretl/state.hpp"
#include "gretl/create_state.hpp"
#include "smith/physics/state/state_manager.hpp"
Include dependency graph for field_state.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  smith::zero_dual_from_state
 functor which takes a std::shared_ptr<FiniteElementState>, and returns a zero-valued std::shared_ptr<FiniteElementDual> with the same space More...
 
struct  smith::zero_state_from_dual
 functor which takes a std::shared_ptr<FiniteElementDual>, and returns a zero-valued std::shared_ptr<FiniteElementState> with the same space More...
 
struct  smith::FieldStateWeightedSum
 temporary object to register the multiplication of a gretl::State<double> with a FieldState. Casts back More...
 

Namespaces

 smith
 Accelerator functionality.
 

Typedefs

using smith::FEFieldPtr = std::shared_ptr< FiniteElementState >
 typedef
 
using smith::FEDualPtr = std::shared_ptr< FiniteElementDual >
 typedef
 
using smith::FieldState = gretl::State< FEFieldPtr, FEDualPtr >
 typedef
 
using smith::ReactionState = gretl::State< FEDualPtr, FEFieldPtr >
 typedef
 
using smith::FieldVecState = gretl::State< std::vector< FEFieldPtr >, std::vector< FEDualPtr > >
 typedef
 
using smith::DoubleState = gretl::State< double, double >
 typedef
 

Functions

FieldState smith::createFieldState (gretl::DataStore &dataStore, const smith::FEFieldPtr &s)
 initialize on the gretl::DataStore a FieldState with values from s
 
template<typename function_space >
FieldState smith::createFieldState (gretl::DataStore &dataStore, function_space space, const std::string &name, const std::string &mesh_tag)
 initialize on the gretl::DataStore a FieldState from a FiniteElementState of given space, name and mesh.
 
ReactionState smith::createReactionState (gretl::DataStore &dataStore, const smith::FEDualPtr &s)
 initialize on the gretl::DataStore a ReactionState with values from s
 
template<typename function_space >
ReactionState smith::createReactionState (gretl::DataStore &dataStore, function_space space, const std::string &name, const std::string &mesh_tag)
 initialize on the gretl::DataStore a ReactionState from a FiniteElementDual of given space, name and mesh.
 
FieldState smith::square (const FieldState &state)
 gretl-function to square (x^2) every component of the Field
 
gretl::State< double > smith::innerProduct (const FieldState &a, const FieldState &b)
 gretl-function to compute the inner product (vector l2-norm) of a and b
 
gretl::State< double > smith::innerProduct (const ReactionState &a, const ReactionState &b)
 gretl-function to compute the inner product (vector l2-norm) of a and b
 
FieldState smith::axpby (double a, const FieldState &x, double b, const FieldState &y)
 gretl-function to compute a*x + b*y
 
FieldState smith::zeroCopy (const FieldState &x)
 gretl-function to make a deep-copy of a FieldState and initialize it to 0.
 
FieldState smith::weighted_average (const FieldState &a, const FieldState &b, double weight)
 gretl-function to compute the weighted average a * weight + b * (1-weight)
 
FieldState smith::axpby (const gretl::State< double > &a, const FieldState &x, const gretl::State< double > &b, const FieldState &y)
 axpby using State<double> and FieldState
 
FieldStateWeightedSum smith::operator* (double a, const FieldState &b)
 multiply scalar by a FieldState to get a temporary FieldStateWeightedSum which can cast back to a FieldState
 
FieldStateWeightedSum smith::operator* (const FieldState &b, double a)
 multiply scalar by a FieldState to get a temporary FieldStateWeightedSum which can cast back to a FieldState
 
FieldStateWeightedSum smith::operator* (double a, const FieldStateWeightedSum &b)
 multiply scalar by a FieldStateWeightedSum to get a temporary FieldStateWeightedSum which can cast back to a FieldState
 
FieldStateWeightedSum smith::operator* (const FieldStateWeightedSum &b, double a)
 multiply scalar by a FieldStateWeightedSum to get a temporary FieldStateWeightedSum which can cast back to a FieldState
 
FieldStateWeightedSum smith::operator* (const gretl::State< double > &a, const FieldState &b)
 multiply scalar by a FieldState to get a temporary FieldStateWeightedSum which can cast back to a FieldState
 
FieldStateWeightedSum smith::operator* (const FieldState &b, const gretl::State< double > &a)
 multiply scalar by a FieldState to get a temporary FieldStateWeightedSum which can cast back to a FieldState
 
FieldStateWeightedSum smith::operator+ (const FieldState &x, const FieldState &y)
 add two FieldState
 
FieldStateWeightedSum smith::operator- (const FieldState &x, const FieldState &y)
 subtract two FieldState
 
FieldStateWeightedSum smith::operator+ (const FieldStateWeightedSum &ax, const FieldStateWeightedSum &by)
 add two FieldStateWeightedSum
 
FieldStateWeightedSum smith::operator- (const FieldStateWeightedSum &ax, const FieldStateWeightedSum &by)
 subtract two FieldStateWeightedSum
 
FieldStateWeightedSum smith::operator+ (const FieldStateWeightedSum &ax, const FieldState &y)
 add FieldStateWeightedSum and FieldState
 
FieldStateWeightedSum smith::operator+ (const FieldState &y, const FieldStateWeightedSum &ax)
 add FieldStateWeightedSum and FieldState
 
FieldStateWeightedSum smith::operator- (const FieldStateWeightedSum &ax, const FieldState &by)
 subtract FieldState from FieldStateWeightedSum
 
FieldStateWeightedSum smith::operator- (const FieldState &ax, const FieldStateWeightedSum &by)
 subtract FieldStateWeightedSum from FieldState
 
mfem::ParFiniteElementSpace & smith::space (FieldState field)
 Get the space from the primal field of a field states.
 
std::vector< const mfem::ParFiniteElementSpace * > smith::spaces (const std::vector< FieldState > &states, const std::vector< FieldState > &params={})
 Get the spaces from the primal fields of a vector of field states.
 
std::vector< FiniteElementState * > smith::getFieldPointers (std::vector< FieldState > &states, std::vector< FieldState > params={})
 Get a vector of FieldPtr or DualFieldPtr from a vector of FieldState.
 
std::vector< const FiniteElementState * > smith::getConstFieldPointers (const std::vector< FieldState > &states, const std::vector< FieldState > &params={})
 Get a vector of ConstFieldPtr or ConstDualFieldPtr from a vector of FieldState.