7 #ifndef cf3_solver_actions_Proto_ElementData_hpp
8 #define cf3_solver_actions_Proto_ElementData_hpp
10 #include <boost/array.hpp>
12 #include <boost/fusion/algorithm/iteration/for_each.hpp>
13 #include <boost/fusion/adapted/mpl.hpp>
14 #include <boost/fusion/mpl.hpp>
15 #include <boost/fusion/container/vector/convert.hpp>
16 #include <boost/fusion/container/vector.hpp>
17 #include <boost/fusion/view/filter_view.hpp>
19 #include <boost/mpl/assert.hpp>
20 #include <boost/mpl/for_each.hpp>
21 #include <boost/mpl/range_c.hpp>
22 #include <boost/mpl/transform.hpp>
23 #include <boost/mpl/vector_c.hpp>
54 template<
typename EquationDataT>
57 template<
typename BoolT,
typename EqDataT>
62 template<
typename EqDataT>
67 typename boost::remove_reference
69 typename boost::fusion::result_of::front<EquationDataT>::type
71 >::type::EtypeT::nb_nodes;
74 template<
typename EqDataT>
84 template<
typename MatchingGrammarT>
95 boost::proto::terminal< boost::proto::_ >,
100 boost::proto::nary_expr<boost::proto::_, boost::proto::vararg<boost::proto::_> >,
101 boost::proto::fold< boost::proto::_, boost::mpl::false_(), boost::mpl::max< boost::proto::_state, boost::proto::call< HasSubGrammar<MatchingGrammarT> > >() >
113 template<
typename ExprT,
typename MatchingGrammarT>
116 static const bool value = boost::result_of<HasSubGrammar<MatchingGrammarT>(ExprT)>::type::value;
128 boost::proto::function< boost::proto::terminal< SFOp<boost::proto::_> >, boost::proto::vararg<boost::proto::_> >,
129 boost::proto::terminal< SFOp<boost::proto::_> >,
130 boost::proto::function<boost::proto::terminal<NodalValuesTag>, FieldTypes>,
131 ElementMatrixGrammar,
132 ElementMatrixGrammarIndexed< boost::mpl::int_<0>, boost::mpl::int_<0> >
138 boost::proto::terminal< Var<boost::mpl::int_<I>, boost::proto::_> >,
149 boost::proto::call< MatchImplicitEval<I> >,
152 boost::proto::terminal< boost::proto::_ >,
157 boost::proto::nary_expr<boost::proto::_, boost::proto::vararg<boost::proto::_> >,
158 boost::proto::fold< boost::proto::_, boost::mpl::false_(), boost::mpl::max< boost::proto::_state, boost::proto::call< HasEvalVar<I> > >() >
168 template<
typename ETYPE>
182 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
212 EtypeT::SF::compute_value(mapped_coords,
m_sf);
268 EtypeT::SF::compute_value(mapped_coords,
m_sf);
333 mutable typename EtypeT::SF::ValueT
m_sf;
344 mesh::Mesh&
mesh = common::find_parent_component<mesh::Mesh>(elements);
345 return common::find_component_recursively_with_tag<mesh::Field>(
mesh, tag);
349 template<
typename ETYPE,
typename SupportEtypeT, U
int Dim,
bool IsEquationVar>
358 template<U
int VarDim,
int Dummy=0>
361 typedef Eigen::Matrix<Real, 1, VarDim>
MatrixT;
364 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
366 template<
typename NodeValuesT>
367 result_type
operator()(
const typename EtypeT::SF::ValueT& sf,
const NodeValuesT& values)
const
382 template<
typename NodeValuesT>
383 result_type
operator()(
const typename EtypeT::SF::ValueT& sf,
const NodeValuesT& values)
const
397 typedef Eigen::Matrix<Real, EtypeT::nb_nodes, Dim>
ValueT;
427 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
432 const mesh::Mesh&
mesh = common::find_parent_component<mesh::Mesh>(elements);
439 template<
typename VariableT>
454 Uint global_sync = 0;
487 for(
int i = 0; i !=
Dim; ++i)
494 template<
typename NodeValsT>
508 template<
typename NodeValsT>
528 EvalT
eval(
const MappedCoordsT& mapped_coords)
const
530 EtypeT::SF::compute_value(mapped_coords,
m_sf);
541 const typename EtypeT::SF::ValueT&
shape_function(
const MappedCoordsT& mapped_coords)
const
543 EtypeT::SF::compute_value(mapped_coords,
m_sf);
554 const GradientT&
nabla(
const MappedCoordsT& mapped_coords)
const
571 EtypeT::SF::compute_value(mapped_coords,
m_sf);
600 mutable typename EtypeT::SF::ValueT
m_sf;
614 template<
typename SupportEtypeT, U
int Dim,
bool IsEquationVar>
632 template<
typename VariableT>
636 m_elements_begin(
m_field.dict().space(elements).size() ?
m_field.dict().space(elements).connectivity()[0][0] : 0),
644 m_field_idx = element_idx + m_elements_begin;
665 return m_dummy_result;
671 return m_dummy_result;
691 template<
typename SupportEtypeT,
bool IsEquationVar>
704 static const Uint dimension = 1;
707 static const bool is_equation_variable = IsEquationVar;
709 template<
typename VariableT>
713 m_elements_begin(
m_field.dict().space(elements).size() ?
m_field.dict().space(elements).connectivity()[0][0] : 0),
721 m_field_idx = element_idx + m_elements_begin;
742 return m_dummy_result;
748 return m_dummy_result;
770 template<
typename DataT,
int Dummy = 0>
773 typedef boost::mpl::bool_<boost::remove_pointer<DataT>::type::is_equation_variable>
type;
779 typedef boost::mpl::false_
type;
784 template<
typename VariablesT,
typename SupportEtypeT,
typename ShapeFunctionsT,
typename EquationVariablesT,
typename MatrixSizesT,
typename EMatrixSizeT>
790 typedef typename boost::mpl::at<VariablesT, I>::type
VarT;
791 typedef typename boost::mpl::at<ShapeFunctionsT, I>::type
EtypeT;
793 typedef typename boost::mpl::if_<IsEquationVar, EMatrixSizeT, typename boost::mpl::at<MatrixSizesT, I>::type>
::type MatSize;
795 template<
typename AVarT,
typename AnETypeT>
798 typedef typename boost::mpl::if_c<AnETypeT::order == 0, ElementBased<FieldWidth<VarT, SupportEtypeT>::value>, AnETypeT>
::type type;
801 template<
typename AnETypeT>
804 typedef boost::mpl::void_
type;
809 typedef typename boost::mpl::if_
811 boost::mpl::is_void_<VarT>,
818 template<
typename VariablesT,
typename EtypeT,
typename EquationVariablesT,
typename MatrixSizesT,
typename EMatrixSizeT>
824 typedef typename boost::mpl::at<VariablesT, I>::type
VarT;
826 typedef typename boost::mpl::if_<IsEquationVar, EMatrixSizeT, typename boost::mpl::at<MatrixSizesT, I>::type>
::type MatSize;
828 typedef typename boost::mpl::if_
830 boost::mpl::is_void_<VarT>,
837 template<
typename IsEqVarT,
typename VariableSFT>
840 typedef typename boost::mpl::if_c<VariableSFT::order == 0, boost::mpl::false_, IsEqVarT>::type
type;
844 template<
typename IsEqVarT>
847 typedef boost::mpl::false_
type;
851 template<
typename EquationVariablesT,
typename VariablesEtypeTT,
typename SupportEtypeT>
854 typedef typename boost::mpl::eval_if
856 boost::mpl::is_sequence<VariablesEtypeTT>,
857 boost::mpl::transform
859 typename boost::mpl::copy<EquationVariablesT, boost::mpl::back_inserter< boost::mpl::vector0<> > >
::type,
863 boost::mpl::transform
865 typename boost::mpl::copy<EquationVariablesT, boost::mpl::back_inserter< boost::mpl::vector0<> > >
::type,
876 template<
typename VariablesT,
typename VariablesEtypeTT,
typename SupportEtypeT,
typename EquationVariablesInT>
880 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
882 typedef typename boost::fusion::result_of::size<VariablesT>::type
NbVarsT;
888 static const Uint dimension = SupportShapeFunction::dimension;
900 typedef Eigen::Matrix<Real, EMatrixSizeT::value, EMatrixSizeT::value>
ElementMatrixT;
905 typedef typename boost::fusion::result_of::as_vector
907 typename boost::mpl::transform
909 typename boost::mpl::copy<boost::mpl::range_c<int,0,NbVarsT::value>, boost::mpl::back_inserter< boost::mpl::vector_c<Uint> > >::type,
915 typedef boost::fusion::filter_view< VariablesDataT, IsEquationData >
EquationDataT;
938 typedef typename boost::mpl::transform
940 typename boost::mpl::copy<VariablesT, boost::mpl::back_inserter< boost::mpl::vector0<> > >::type,
942 >::type NbEqsPerVarT;
964 update_blocks(
typename boost::fusion::result_of::empty<EquationDataT>::type());
979 template<
typename ExprT>
994 typedef typename boost::remove_pointer
996 typename boost::remove_reference
998 typename boost::fusion::result_of::at
1007 template<
typename I>
1010 typedef typename boost::remove_pointer
1012 typename boost::remove_reference
1014 typename boost::fusion::result_of::at
1025 template<
typename I>
1032 template<
typename I>
1101 m_variables_data(vars_data),
1106 template<
typename I>
1109 apply(boost::fusion::at<I>(m_variables), boost::fusion::at<I>(m_variables_data));
1112 void apply(
const boost::mpl::void_&,
const boost::mpl::void_&)
1116 template<
typename VarT,
typename VarDataT>
1119 d =
new VarDataT(v, m_elements, m_support);
1135 template<
typename I>
1145 template<
typename T>
1163 template<
typename I>
1173 template<
typename T>
1184 template<
typename ExprT>
1187 PrecomputeData(VariablesDataT& vars_data,
const typename SupportEtypeT::MappedCoordsT& mapped_coords) :
1188 m_variables_data(vars_data),
1193 template<
typename I>
1199 template<
typename I,
typename T>
1204 template<
typename I,
typename T>
1211 template<U
int Dim,
bool IsEquationVar>
1217 template<
typename T>
1235 template<
typename DataT>
1238 typename DataT::ValueResultT
v = data->value();
1239 static const Uint rows = DataT::ValueT::RowsAtCompileTime;
1240 static const Uint cols = DataT::ValueT::ColsAtCompileTime;
1241 for(
Uint i = 0; i != cols; ++i)
1243 element_vector.template segment<rows>( (data->offset + i)*rows ) = v.col(i);
1256 #endif // cf3_solver_actions_Proto_ElementData_hpp
void compute_values(const MappedCoordsT &mapped_coords) const
boost::fusion::filter_view< VariablesDataT, IsEquationData > EquationDataT
A view of only the data used in the element matrix.
SupportEtypeT SupportShapeFunction
Shape function for the support.
const RealMatrix & nabla(RealMatrix mapped_coords=RealMatrix()) const
boost::mpl::if_c< VariableSFT::order==0, boost::mpl::false_, IsEqVarT >::type type
EvalT eval() const
Return previously computed evaluation.
RealMatrix m_dummy_result
void set_element(const Uint element_idx)
Update nodes for the current element.
T * all_reduce(const Op &op, const T *in_values, const int in_n, T *out_values, const int stride=1)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef boost::fusion::result_of::size< VariablesT >::type NbVarsT
Number of variales that we have stored.
std::string name(ComponentWrapper &self)
void apply(const boost::mpl::void_ &)
const EtypeT::JacobianT & jacobian_inverse() const
Precomputed jacobian inverse.
void resize(Uint numnodes, Uint numeqs)
setting up sizes
boost::proto::terminal< SFOp< NormalOp > >::type const normal
boost::mpl::if_< IsEquationVar, EMatrixSizeT, typename boost::mpl::at< MatrixSizesT, I >::type >::type MatSize
void precompute_element_matrices(const typename SupportEtypeT::MappedCoordsT &mapped_coords, const ExprT &e)
Precompute element matrices, for the variables found in expr.
DataType< I >::type & var_data(const I &)
Return the data stored at index I.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW const mesh::Connectivity & get_connectivity(const std::string &tag, mesh::Elements &elements)
We store data as a fixed-size Eigen matrix, so we need to make sure alignment is respected.
void apply(boost::mpl::true_, I, T *&d)
VariablesDataT m_variables_data
Data associated with each numbered variable.
EtypeT::SF::GradientT GradientT
Type of the gradient.
const EtypeT::CoordsT & coordinates(const typename EtypeT::MappedCoordsT &mapped_coords) const
void compute_normal(const typename EtypeT::MappedCoordsT &mapped_coords) const
Precompute normal (if we have a "face" type)
bool is_null(T ptr)
predicate for comparison to nullptr
const GradientT & nabla() const
Previously calculated gradient matrix.
Grammar matching expressions if they have a terminal with the index given in the template parameter...
TableArray< Uint >::type ArrayT
the type of the internal structure of the table
const Uint offset
Index in the field array for this variable.
Safe pointer to an object. This is the supported method for referring to components.
void update_blocks(boost::mpl::false_)
Update block accumulator only if a system of equations is accessed in the expressions.
external boost library namespace
BOOST_MPL_ASSERT_NOT((boost::is_same< EvalT, const Eigen::Matrix< Real, 1, 1 > & >))
SetElement(VariablesDataT &vars_data, const Uint elem_idx)
static FieldSynchronizer & instance()
Singleton implementation.
const SupportT & support() const
ElementVectorT & element_vector
EvalT eval(const MappedCoordsT &mapped_coords=MappedCoordsT()) const
Calculate and return the interpolation at given mapped coords.
EtypeT::JacobianT m_jacobian_inverse
void copy(const std::vector< Real > &vector, RealMatrix &realmatrix)
Copy std::vector to dynamic RealMatrix types.
void insert(mesh::Field &f, bool do_periodic_element_update)
void update_block_connectivity(math::LSS::BlockAccumulator &block_accumulator)
Initializes the pointers in a VariablesDataT fusion sequence.
Interpolation of a field.
SupportT & support()
Get the data associated with the geometric support.
static void compute_jacobian(const MappedCoordsT &mapped_coord, const NodesT &nodes, MatrixType &jacobian)
static Real jacobian_determinant(const MappedCoordsT &mapped_coord, const NodesT &nodes)
EtypeTVariableData(const VariableT &placeholder, mesh::Elements &elements, const SupportT &support)
Eigen::Matrix< Real, EMatrixSizeT::value, 1 > ElementVectorT
Type for the element vector (combined for all equations)
void compute_values(const MappedCoordsT &mapped_coords) const
static const Uint nb_lss_nodes
Metafunction class for creating an appropriate data type.
ValueT m_nodes
Stored node data.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW result_type operator()(const typename EtypeT::SF::ValueT &sf, const NodeValuesT &values) const
Precompute variables data.
boost::array< Uint, EtypeT::nb_nodes > m_connectivity
Connectivity table for the current element.
MatrixSizePerVar< VariablesT, VariablesEtypeTT, SupportEtypeT >::type MatrixSizesT
Element matrix size per var.
Returns true if an interpolation op is used.
Eigen::Matrix< Real, EtypeT::nb_nodes, Dim > ValueT
The value type for all element values.
ValueResultT value() const
Reference to the stored data, i.e. the matrix of nodal values.
EtypeT::MappedCoordsT MappedCoordsT
Type for passing mapped coordinates.
InitVariablesData(VariablesT &vars, mesh::Elements &elems, VariablesDataT &vars_data, const SupportT &sup)
const EtypeT::JacobianT & jacobian(const typename EtypeT::MappedCoordsT &mapped_coords) const
Jacobian matrix computed by the shape function.
EtypeT::NodesT ValueT
The value type for all element nodes.
void compute_values_dispatch(boost::mpl::true_, const MappedCoordsT &mapped_coords) const
Precompute for volume EtypeT.
SupportEtypeT::MappedCoordsT MappedCoordsT
EtypeT::SF::ValueT m_sf
Temp storage for non-scalar results.
boost::fusion::result_of::as_vector< typename boost::mpl::transform< typename boost::mpl::copy< boost::mpl::range_c< int, 0, NbVarsT::value >, boost::mpl::back_inserter< boost::mpl::vector_c< Uint > > >::type, MakeVarData< VariablesT, SupportEtypeT, VariablesEtypeTT, EquationVariablesT, MatrixSizesT, EMatrixSizeT > >::type >::type VariablesDataT
mesh::Elements & m_elements
Referred Elements.
void compute_jacobian_dispatch(boost::mpl::false_, const typename EtypeT::MappedCoordsT &) const
const common::Table< Real > & m_coordinates
Coordinates table.
boost::mpl::at< VariablesT, I >::type VarT
Functions and operators associated with a geometric support.
ElementMatrixT m_element_matrices[CF3_PROTO_MAX_ELEMENT_MATRICES]
Data associated with field variables.
Real & ValueResultT
Type of returned value.
Set the element on each stored data item.
void apply(const boost::mpl::void_ &)
void operator()(const I &)
VariablesDataT & m_variables_data
FillRhs(ElementVectorT &elm_v)
void set_element(const Uint element_idx)
Update nodes for the current element.
boost::mpl::at< EquationVariablesT, I >::type IsEquationVar
Calculate the size of the element matrix.
Eigen::Matrix< Real, EMatrixSizeT::value, EMatrixSizeT::value > ElementMatrixT
Type for the element matrix (combined for all equations)
FilterEquationVars< EquationVariablesInT, VariablesEtypeTT, SupportEtypeT >::type EquationVariablesT
Filter out element-based fields from the equation variables.
boost::mpl::at< EquationVariablesT, I >::type IsEquationVar
static const bool is_equation_variable
True if this variable is an unknow in the system of equations.
EtypeT::JacobianT m_jacobian_matrix
boost::mpl::if_< boost::mpl::is_void_< VarT >, boost::mpl::void_, EtypeTVariableData< EtypeT, EtypeT, FieldWidth< VarT, EtypeT >::value, IsEquationVar::value > * >::type type
Get the width of a field varaible, based on the variable type.
Dim
Enumeration of the dimensions.
ElementVectorT m_element_rhs
const Uint offset
Index in the field array for this variable.
ElementBased< Dim > EtypeT
Filter out element-based fields from the possible equation variables.
EtypeT::CoordsT m_normal_vector
boost::mpl::eval_if< boost::mpl::is_sequence< VariablesSFT >, boost::mpl::transform< typename boost::mpl::copy< VariablesT, boost::mpl::back_inserter< boost::mpl::vector0<> > >::type, VariablesSFT, NodesTimesDim< boost::mpl::_1, boost::mpl::_2, SupportSF > >, boost::mpl::transform< typename boost::mpl::copy< VariablesT, boost::mpl::back_inserter< boost::mpl::vector0<> > >::type, NodesTimesDim< boost::mpl::_1, VariablesSFT, SupportSF > > >::type type
boost::remove_pointer< typename boost::remove_reference< typename boost::fusion::result_of::at< VariablesDataT, I >::type >::type >::type type
Real e()
Definition of the Unit charge [C].
Return the type of the stored variable I (I being an Integral Constant in the boost::mpl sense) ...
void compute_values_dispatch(boost::mpl::false_, const MappedCoordsT &mapped_coords) const
Precompute for non-volume EtypeT.
void operator()(const I &)
void neighbour_indices(const T &idx_vector)
entering the indices where the local matrix is lying
VariablesT & m_variables
Variables used in the expression.
Delete stored per-variable data.
Eigen::Matrix< Real, EtypeT::nb_nodes *Dim, 1 > ElementVectorT
The value type for a linearised representation of the element values.
const ValueT & ValueResultT
Return type of the value() method.
ElementMatrixT & element_matrix(const int i)
Retrieve the element matrix at index i.
const SupportT & m_support
const SupportEtypeT::MappedCoordsT & m_mapped_coords
Eigen::Matrix< Real, 1, VarDim > MatrixT
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealMatrix
Dynamic sized matrix of Real scalars.
Helper struct to get the number of element nodes.
const EtypeT::CoordsT & normal() const
void compute_normal_dispatch(boost::mpl::true_, const typename EtypeT::MappedCoordsT &mapped_coords) const
SupportT m_support
Data for the geometric support.
Holds the Component class, as well as the ComponentIterator class plus some functions related to comp...
boost::mpl::bool_< boost::remove_pointer< DataT >::type::is_equation_variable > type
GeometricSupport< SupportEtypeT > SupportT
Eigen::Matrix< Real, nb_nodes, Hexa3D_traits::dimension > NodesT
Eigen::Matrix< Real, 1, Dim *EtypeT::nb_nodes > DivergenceLinT
Type of the linearized form of the divergence.
const SupportT & support() const
Reference to the geometric support.
void set_element(const Uint element_idx)
Update element index.
EtypeT::SF::ValueT m_sf
Cached data.
const EquationDataT m_equation_data
Filtered view of the data associated with equation variables.
const EtypeT::CoordsT & normal(const typename EtypeT::MappedCoordsT &mapped_coords) const
ElementMatrixSize< MatrixSizesT, EquationVariablesT >::type EMatrixSizeT
Size for the element matrix.
void apply(boost::mpl::false_, I, T)
EtypeT::SF::GradientT m_mapped_gradient_matrix
void operator()(const I &)
mesh::Elements & m_elements
const mesh::Connectivity::ArrayT & m_connectivity_array
Connectivity for all elements.
ElementVectorT & element_vector(const int i)
Retrieve the element vector at index i.
const Uint m_elements_begin
void set_element(const Uint element_idx)
Update nodes for the current element and set the connectivity for the passed block accumulator...
PrecomputeData(VariablesDataT &vars_data, const typename SupportEtypeT::MappedCoordsT &mapped_coords)
ElementVectorT m_element_vector
mesh::Field & find_field(mesh::Elements &elements, const std::string &tag)
Helper function to find a field starting from a region.
const mesh::Connectivity::ArrayT & m_connectivity_array
Connectivity table.
const EtypeT::JacobianT & jacobian() const
Precomputed jacobian.
TableConstRow< Uint >::type ConstRow
the const type of a row in the internal structure of the table
Top-level namespace for coolfluid.
ETYPE EtypeT
The shape function type.
void compute_values(const MappedCoordsT &mapped_coords) const
Precompute all the cached values for the given geometric support and mapped coordinates.
result_type operator()(const typename EtypeT::SF::ValueT &sf, const NodeValuesT &values) const
const EtypeT::SF::ValueT & shape_function(const MappedCoordsT &mapped_coords) const
Shape function matrix at mapped coordinates (calculates and returns)
InterpolationImpl< Dim > m_eval
const boost::array< Uint, EtypeT::nb_nodes > & element_connectivity() const
const ElementVectorT & element_vector() const
void fill(NodeValuesT &to_fill, const common::Table< Real > &data_array, const RowT &element_row, const Uint start=0)
Fill STL-vector like per-node data storage.
void apply(const VarT &v, VarDataT *&d)
void apply(const boost::mpl::void_ &, const boost::mpl::void_ &)
void init_block_accumulator(boost::mpl::false_)
math::LSS::BlockAccumulator block_accumulator
Stores a mutable block accululator, always up-to-date with index mapping and correct size...
const EtypeT::CoordsT & coordinates() const
Precomputed coordinates.
GeometricSupport< SupportEtypeT > SupportT
Eigen::Matrix< Real, Hexa3D_traits::dimension, 1 > CoordsT
const EtypeT::SF::ValueT & shape_function() const
Previously calculated shape function matrix.
Real m_jacobian_determinant
RealMatrix m_dummy_result
boost::mpl::eval_if< boost::mpl::is_sequence< VariablesEtypeTT >, boost::mpl::transform< typename boost::mpl::copy< EquationVariablesT, boost::mpl::back_inserter< boost::mpl::vector0<> > >::type, VariablesEtypeTT, FilterElementField< boost::mpl::_1, boost::mpl::_2 > >, boost::mpl::transform< typename boost::mpl::copy< EquationVariablesT, boost::mpl::back_inserter< boost::mpl::vector0<> > >::type, FilterElementField< boost::mpl::_1, VariablesEtypeTT > > >::type type
Set the element on each stored data item.
ETYPE EtypeT
The shape function type.
void compute_jacobian_dispatch(boost::mpl::true_, const typename EtypeT::MappedCoordsT &mapped_coords) const
void compute_jacobian(const typename EtypeT::MappedCoordsT &mapped_coords) const
Precompute jacobian for the given mapped coordinates.
Hexa3D_traits::SF::MappedCoordsT MappedCoordsT
void operator()(const I &)
EtypeTVariableData(const VariableT &placeholder, mesh::Elements &elements, const SupportT &support)
ValueT m_element_values
Value of the field in each element node.
boost::mpl::fold< typename FilterMatrixSizes< MatrixSizesT, EquationVariablesT >::type, boost::mpl::int_< 0 >, boost::mpl::plus< boost::mpl::_1, boost::mpl::_2 > >::type type
Grammar matching expressions if they have a terminal with the index given in the template parameter...
VariablesDataT & m_variables_data
mesh::Field & m_field
Data table.
const Uint offset
Index of where the variable we need is in the field data row.
const SupportT & m_support
void compute_normal_dispatch(boost::mpl::false_, const typename EtypeT::MappedCoordsT &) const
ElementVectorT m_element_vectors[CF3_PROTO_MAX_ELEMENT_MATRICES]
Uint m_element_idx
Index for the current element.
const RealMatrix & shape_function(RealMatrix mapped_coords=RealMatrix()) const
unsigned int Uint
typedef for unsigned int
const VariableType< I >::type & variable(const I &)
Return the variable stored at index I.
Space & space(const Dictionary &dict)
const Uint m_elements_begin
boost::mpl::if_c< AnETypeT::order==0, ElementBased< FieldWidth< VarT, SupportEtypeT >::value >, AnETypeT >::type type
ElementData(VariablesT &variables, mesh::Elements &elements)
void init_block_accumulator(boost::mpl::true_)
void add_nodal_values(const NodeValsT &vals)
static Real volume(const NodesT &nodes)
void compute_coordinates() const
Precompute the interpolated value (requires a computed EtypeT)
const SupportT & m_support
boost::remove_pointer< typename boost::remove_reference< typename boost::fusion::result_of::at< VariablesT, I >::type >::type >::type type
EvalT eval(const MappedCoordsT &mapped_coords=MappedCoordsT()) const
Calculate and return the interpolation at given mapped coords.
Dummy shape function type used for element-based fields.
InterpolationImpl< Dim >::result_type EvalT
The result type of an interpolation at given mapped coordinates.
static const Uint dimension
The dimension of the variable.
const MatrixT & result_type
Return the type of the data stored for variable I (I being an Integral Constant in the boost::mpl sen...
EtypeT::CoordsT m_eval_result
GeometricSupport< SupportEtypeT > SupportT
Data type for the geometric support.
DeleteVariablesData(VariablesDataT &vars_data)
EvalT eval(const MappedCoordsT &mapped_coords) const
Calculate and return the interpolation at given mapped coords.
VariablesDataT & variables_data
EtypeTVariableData(const VariableT &placeholder, mesh::Elements &elements, const SupportT &support)
Eigen::Map< Eigen::Matrix< Real, 1, Dim > > ValueResultT
Type of returned value.
boost::mpl::at< ShapeFunctionsT, I >::type EtypeT
void apply(boost::mpl::false_, T *&d)
RealMatrix & nabla(RealMatrix mapped_coords=RealMatrix()) const
const GradientT & nabla(const MappedCoordsT &mapped_coords) const
Return the gradient matrix.
Eigen::Matrix< Real, Hexa3D_traits::SF::dimensionality, Hexa3D_traits::dimension > JacobianT
Real jacobian_determinant(const typename EtypeT::MappedCoordsT &mapped_coords) const
void operator()(const DataT *data) const
const ValueT & ValueResultT
Return type of the value() method.
boost::mpl::if_< boost::mpl::is_void_< VarT >, boost::mpl::void_, EtypeTVariableData< EEtypeT, SupportEtypeT, FieldWidth< VarT, SupportEtypeT >::value, IsEquationVar::value > * >::type type
GeometricSupport< SupportEtypeT > SupportT
Data type for the geometric support.
static Comm & instance()
Return a reference to the current PE.
Real jacobian_determinant() const
Precomputed jacobian determinant.
void apply(boost::mpl::true_, EtypeTVariableData< ElementBased< Dim >, SupportEtypeT, Dim, IsEquationVar > *&)
static const Uint nb_nodes
const RealMatrix & shape_function(RealMatrix mapped_coords=RealMatrix()) const
void set_element(const Uint element_idx)
Update nodes for the current element.
GetEETypeT< VarT, EtypeT >::type EEtypeT
ValueResultT value() const
ValueResultT nodes() const
Reference to the current nodes.
void add_nodal_values_component(const NodeValsT &vals, const Uint component_idx)
#define CF3_PROTO_MAX_ELEMENT_MATRICES
const SupportT & m_support
Gemetric support.
void update_blocks(boost::mpl::true_)
Connectivity & connectivity()
connectivity table to dictionary entries
2D Lagrange P1 Triangular Element type This class provides the lagrangian shape function describing t...
void compute_shape_functions(const typename EtypeT::MappedCoordsT &mapped_coords) const
Precompute the shape function matrix.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW GeometricSupport(const mesh::Elements &elements)
We store nodes as a fixed-size Eigen matrix, so we need to make sure alignment is respected...
SupportEtypeT::MappedCoordsT MappedCoordsT
ElementVectorT & element_rhs()
Retrieve the element RHS.
VariablesDataT & variables_data
Predicate to check if data belongs to an equation variable.
boost::mpl::at< VariablesT, I >::type VarT
boost::mpl::if_< IsEquationVar, EMatrixSizeT, typename boost::mpl::at< MatrixSizesT, I >::type >::type MatSize