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

Wrapper of serac::Functional for evaluating integrals and derivatives of quantities with shape displacement fields. More...

#include "serac/numerics/functional/functional.hpp"
Include dependency graph for shape_aware_functional.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  serac::detail::ShapeCorrection< dim, shape_type >
 A helper struct that contains the appropriate parent-to-physical and physical-to-parent transformations for an applied shape field. More...
 
class  serac::ShapeAwareFunctional< shape, test(trials...), exec >
 This is a small wrapper around serac::Functional for shape-displaced domains of integration. More...
 

Namespaces

 serac
 Accelerator functionality.
 

Functions

template<typename position_type , typename shape_type >
SERAC_HOST_DEVICE auto serac::detail::compute_boundary_area_correction (const position_type &X, const shape_type &shape)
 Compute the boundary area correction term for boundary integrals with a shape displacement field. More...
 
template<typename lambda , typename coord_type , typename shape_type , typename space_types , typename trial_types , typename correction_type , int... i>
SERAC_HOST_DEVICE auto serac::detail::apply_shape_aware_qf_helper (lambda &&qf, double t, const coord_type &x, const shape_type &shape, const space_types &space_tuple, const trial_types &arg_tuple, const correction_type &correction, std::integer_sequence< int, i... >)
 A helper function to modify all of the trial function input derivatives according to the given shape displacement for integrands without state variables. More...
 
template<typename lambda , typename coord_type , typename state_type , typename shape_type , typename space_types , typename trial_types , typename correction_type , int... i>
SERAC_HOST_DEVICE auto serac::detail::apply_shape_aware_qf_helper_with_state (lambda &&qf, double t, const coord_type &x, state_type &state, const shape_type &shape, const space_types &space_tuple, const trial_types &arg_tuple, const correction_type &correction, std::integer_sequence< int, i... >)
 A helper function to modify all of the trial function input derivatives according to the given shape displacement for integrands without state variables. More...
 

Detailed Description

Wrapper of serac::Functional for evaluating integrals and derivatives of quantities with shape displacement fields.

Definition in file shape_aware_functional.hpp.

Function Documentation

◆ apply_shape_aware_qf_helper()

template<typename lambda , typename coord_type , typename shape_type , typename space_types , typename trial_types , typename correction_type , int... i>
SERAC_HOST_DEVICE auto serac::detail::apply_shape_aware_qf_helper ( lambda &&  qf,
double  t,
const coord_type &  x,
const shape_type &  shape,
const space_types &  space_tuple,
const trial_types &  arg_tuple,
const correction_type &  correction,
std::integer_sequence< int, i... >   
)

A helper function to modify all of the trial function input derivatives according to the given shape displacement for integrands without state variables.

Template Parameters
lambdaThe q-function type
coord_typeThe input position type
shape_typeThe type of the shape displacement argument
space_typesThe type of the input finite element space tuple for the trial functions
trial_typesThe type of the input finite element argument tuple (values and derivatives)
correction_typeThe type of the shape correction struct
iIndices for accessing the individual arguments for the underlying q-function
Parameters
qfThe q-function integrand with expects shape-adjusted arguments
tThe time at which to evaluate the integrand
xThe spatial coordinate at which to evaluate the integrand
shapeThe space displacement at which to evaluate the integrand
space_tupleThe tuple of finite element spaces used by the input trial functions
arg_tupleThe tuple of input arguments for the trial functions (value and gradient)
correctionThe shape correction struct containing the data and methods used to calculate the appropriate pullback mappings
Returns
The q-function value using the shape-modified input arguments. Note that the returned value and flux have not been modified to reflect the shape displacement.

Definition at line 201 of file shape_aware_functional.hpp.

◆ apply_shape_aware_qf_helper_with_state()

template<typename lambda , typename coord_type , typename state_type , typename shape_type , typename space_types , typename trial_types , typename correction_type , int... i>
SERAC_HOST_DEVICE auto serac::detail::apply_shape_aware_qf_helper_with_state ( lambda &&  qf,
double  t,
const coord_type &  x,
state_type &  state,
const shape_type &  shape,
const space_types &  space_tuple,
const trial_types &  arg_tuple,
const correction_type &  correction,
std::integer_sequence< int, i... >   
)

A helper function to modify all of the trial function input derivatives according to the given shape displacement for integrands without state variables.

Template Parameters
lambdaThe q-function type
coord_typeThe input position type
state_typeThe quadrature data container type
shape_typeThe type of the shape displacement argument
space_typesThe type of the input finite element space tuple for the trial functions
trial_typesThe type of the input finite element argument tuple (values and derivatives)
correction_typeThe type of the shape correction struct
iIndices for accessing the individual arguments for the underlying q-function
Parameters
qfThe q-function integrand with expects shape-adjusted arguments
tThe time at which to evaluate the integrand
xThe spatial coordinate at which to evaluate the integrand
stateThe quadrature data at which to evaluate the integrand
shapeThe space displacement at which to evaluate the integrand
space_tupleThe tuple of finite element spaces used by the input trial functions
arg_tupleThe tuple of input arguments for the trial functions (value and gradient)
correctionThe shape correction struct containing the data and methods used to calculate the appropriate pullback mappings
Returns
The q-function value using the shape-modified input arguments. Note that the returned value and flux have not been modified to reflect the shape displacement.

Definition at line 239 of file shape_aware_functional.hpp.

◆ compute_boundary_area_correction()

template<typename position_type , typename shape_type >
SERAC_HOST_DEVICE auto serac::detail::compute_boundary_area_correction ( const position_type &  X,
const shape_type &  shape 
)

Compute the boundary area correction term for boundary integrals with a shape displacement field.

Template Parameters
position_typeThe position input argument type
shape_typeThe shape displacement input argument type
Parameters
XThe input position (value and gradient)
shapeThe input shape displacement (value and gradient)
Returns
The area correction factor transforming the boundary integral from the reference domain area into the shape-displaced area

Definition at line 155 of file shape_aware_functional.hpp.