19 #ifndef OP_FACTORY_HH_
20 #define OP_FACTORY_HH_
29 template<
unsigned int dim>
38 template<
class OpType>
44 template<
class ValueType,
template<
unsigned int,
class,
unsigned int>
class OpType,
class Domain>
51 std::shared_ptr< FiniteElement<dim> >
fe_;
54 template<
unsigned int dim>
98 return this->
template make_qarray<Scalar, Op::ScalarShape, Op::BulkDomain>(component_idx);
103 return this->
template make_qarray<Vector, Op::DispatchVectorShape, Op::BulkDomain>(component_idx);
117 return this->
template make_qarray<Vector, Op::GradScalarShape, Op::BulkDomain>(component_idx);
128 return this->
template make_qarray<Tensor, Op::DispatchGradVectorShape, Op::BulkDomain>(component_idx);
139 return this->
template make_qarray<Tensor, Op::VectorSymGrad, Op::BulkDomain>(component_idx);
150 return this->
template make_qarray<Scalar, Op::VectorDivergence, Op::BulkDomain>(component_idx);
155 template<
unsigned int dim>
196 return this->
template make_qarray<Scalar, Op::ScalarShape, Op::SideDomain>(component_idx);
202 return this->
template make_qarray<Vector, Op::DispatchVectorShape, Op::SideDomain>(component_idx);
208 return this->
template make_qarray<Vector, Op::GradScalarShape, Op::SideDomain>(component_idx);
219 return this->
template make_qarray<Tensor, Op::DispatchGradVectorShape, Op::SideDomain>(component_idx);
230 return this->
template make_qarray<Tensor, Op::VectorSymGrad, Op::SideDomain>(component_idx);
241 return this->
template make_qarray<Scalar, Op::VectorDivergence, Op::SideDomain>(component_idx);
246 template<
unsigned int dim>
252 : patch_fe_values_(pfev) {
254 fe_low_dim_ = fe[
Dim<dim-1>{}];
258 template<
class ValueType,
template<
unsigned int,
class,
unsigned int>
class OpType>
261 auto fe_component_low = patch_fe_values_.fe_comp(fe_low_dim_, component_idx);
262 auto *low_dim_op = patch_fe_values_.template
get< OpType<dim-1,
Op::BulkDomain, 3>, dim-1 >(fe_component_low);
266 auto fe_component_high = patch_fe_values_.fe_comp(fe_high_dim_, component_idx);
267 auto *high_dim_op = patch_fe_values_.template get< OpType<dim, Op::SideDomain, 3>, dim >(fe_component_high);
268 auto *high_dim_zero_op = patch_fe_values_.template get< Op::OpZero<dim, Op::SideDomain, 3>, dim >(fe_component_high);
270 ASSERT_EQ(fe_component_high->fe_type(), fe_component_low->fe_type()).error(
"Type of FiniteElement of low and high element must be same!\n");
271 return FeQJoin<ValueType>(low_dim_op, high_dim_op, low_dim_zero_op, high_dim_zero_op);
276 return this->
template make_qjoin<Scalar, Op::ScalarShape>(component_idx);
281 return this->
template make_qjoin<Vector, Op::DispatchVectorShape>(component_idx);
286 return this->
template make_qjoin<Tensor, Op::DispatchGradVectorShape>(component_idx);
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
std::shared_ptr< FiniteElement< dim > > fe_
BaseValues(PatchFEValues< 3 > &pfev)
PatchFEValues< 3 > & patch_fe_values_
FeQArray< ValueType > make_qarray(uint component_idx=0)
Factory method. Same as previous but creates FE operation.
PatchOp< 3 > * make_patch_op()
Factory method. Creates operation of given OpType.
FeQ< Scalar > JxW()
Register the product of Jacobian determinant and the quadrature weight at bulk quadrature points.
FeQArray< Vector > grad_scalar_shape(uint component_idx=0)
Return the value of the function_no-th gradient shape function at the p bulk quadrature point.
ElQ< Scalar > determinant()
Create bulk accessor of jac determinant entity.
FeQ< Vector > coords()
Create bulk accessor of coords entity.
FeQArray< Tensor > grad_vector_shape(uint component_idx=0)
Return the value of the function_no-th gradient vector shape function at the p bulk quadrature point.
FeQArray< Vector > vector_shape(uint component_idx=0)
FeQArray< Scalar > scalar_shape(uint component_idx=0)
Return the value of the function_no-th shape function at the p bulk quadrature point.
FeQArray< Scalar > vector_divergence(uint component_idx=0)
Return the value of the function_no-th vector divergence at the p bulk quadrature point.
BulkValues(PatchFEValues< 3 > &pfev, MixedPtr< FiniteElement > fe)
Constructor.
FeQArray< Tensor > vector_sym_grad(uint component_idx=0)
Return the value of the function_no-th vector symmetric gradient at the p bulk quadrature point.
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
JoinValues(PatchFEValues< 3 > &pfev, FMT_UNUSED MixedPtr< FiniteElement > fe)
Constructor.
FeQJoin< Tensor > gradient_vector_join_shape(FMT_UNUSED uint component_idx=0)
FeQJoin< Vector > vector_join_shape(FMT_UNUSED uint component_idx=0)
FeQJoin< Scalar > scalar_join_shape(FMT_UNUSED uint component_idx=0)
std::shared_ptr< FiniteElement< dim > > fe_high_dim_
FeQJoin< ValueType > make_qjoin(uint component_idx=0)
Factory method. Same as previous but creates FE operation.
FeQJoin< Vector > vector_join_shape(uint component_idx=0)
JoinValues(PatchFEValues< 3 > &pfev, MixedPtr< FiniteElement > fe)
Constructor.
FeQJoin< Tensor > gradient_vector_join_shape(uint component_idx=0)
std::shared_ptr< FiniteElement< dim-1 > > fe_low_dim_
PatchFEValues< 3 > & patch_fe_values_
FeQJoin< Scalar > scalar_join_shape(uint component_idx=0)
Class used as template type for type resolution Bulk / Side.
Evaluates Jacobian determinants on Bulk (Element) / Side.
Evaluates normal vector on side quadrature points.
Class represents zero operation of Join quantities.
Evaluates coordinates of quadrature points - not implemented yet.
PatchOp< spacedim > * get()
Returns operation of given dim and OpType, creates it if doesn't exist.
std::shared_ptr< FiniteElement< dim > > fe_comp(std::shared_ptr< FiniteElement< dim > > fe, uint component_idx)
Returnd FiniteElement of component_idx for FESystem or fe for other types.
FeQ< Vector > coords()
Create side accessor of coords entity.
ElQ< Vector > normal_vector()
Register the normal vector to a side at side quadrature points.
FeQArray< Scalar > scalar_shape(uint component_idx=0)
Same as BulkValues::scalar_shape but register at side quadrature points.
FeQArray< Tensor > grad_vector_shape(uint component_idx=0)
Return the value of the function_no-th gradient vector shape function at the p bulk quadrature point.
FeQArray< Vector > vector_shape(uint component_idx=0)
Same as BulkValues::vector_shape but register at side quadrature points.
FeQArray< Tensor > vector_sym_grad(uint component_idx=0)
Return the value of the function_no-th vector symmetric gradient at the p side quadrature point.
FeQArray< Vector > grad_scalar_shape(uint component_idx=0)
Same as BulkValues::grad_scalar_shape but register at side quadrature points.
SideValues(PatchFEValues< 3 > &pfev, MixedPtr< FiniteElement > fe)
Constructor.
FeQArray< Scalar > vector_divergence(uint component_idx=0)
Return the value of the function_no-th vector divergence at the p side quadrature point.
ElQ< Scalar > determinant()
Create bulk accessor of jac determinant entity.
FeQ< Scalar > JxW()
Same as BulkValues::JxW but register at side quadrature points.
Store finite element reinit functions.