22 #include <Eigen/Dense>
44 template<
unsigned int spacedim = 3>
67 if (shape_vec.size() == 1) shape_vec.push_back(1);
117 std::stringstream ss;
133 inline Eigen::Map<Eigen::Matrix<ArenaVec<double>, Eigen::Dynamic, Eigen::Dynamic>>
result_matrix() {
134 return Eigen::Map<Eigen::Matrix<ArenaVec<double>, Eigen::Dynamic, Eigen::Dynamic>>(
result_.data(),
shape_[0],
shape_[1] *
n_dofs_);
141 return Eigen::Map<Eigen::Matrix<ArenaVec<double>, Eigen::Dynamic, Eigen::Dynamic>>(
result_.data()+i_dof*n_dof_comps,
shape_[0],
shape_[1]);
145 inline Eigen::Vector<ArenaVec<double>, Eigen::Dynamic> &
raw_result() {
150 inline const Eigen::Vector<ArenaVec<double>, Eigen::Dynamic> &
raw_result()
const {
167 template <
class ValueType>
176 template <
class ValueType>
184 Eigen::Vector<ArenaVec<double>, Eigen::Dynamic>
result_;
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
#define ASSERT_GT(a, b)
Definition of comparative assert macro (Greater Than) only for debug mode.
Class represents element or FE operations.
Eigen::Vector< ArenaVec< double >, Eigen::Dynamic > result_
Result matrix of operation.
Eigen::Map< Eigen::Matrix< ArenaVec< double >, Eigen::Dynamic, Eigen::Dynamic > > result_sub_matrix(uint i_dof)
Return map referenced result of DOF values as Eigen::Matrix.
uint n_dofs() const
Getter for n_dofs_.
virtual ~PatchOp()
Destructor.
std::vector< PatchOp< spacedim > * > input_ops_
Indices of operations in PatchPointValues::operations_ vector on which PatchOp is depended.
PatchOp< spacedim > * input_ops(uint i_op) const
Return pointer to operation of i_op index in input operation vector.
ElemDomain domain() const
Getter for bulk_side flag.
Eigen::Vector< ArenaVec< double >, Eigen::Dynamic > & raw_result()
Return map referenced result as Eigen::Vector.
OpSizeType size_type_
Type of operation by size of vector (element, point or fixed size)
PatchOp(uint dim, PatchFEValues< spacedim > &pfev, std::initializer_list< uint > shape, OpSizeType size_type, uint n_dofs=1)
const std::vector< uint > & shape() const
Getter for shape_.
ValueType point_value(uint point_idx, uint i_dof=0) const
std::string format_shape() const
std::vector< uint > set_shape_vec(std::initializer_list< uint > shape) const
Aligns shape_vec to 2 items (equal to matrix number of dimensions)
OpSizeType size_type() const
Getter for size_type_.
Eigen::Map< Eigen::Matrix< ArenaVec< double >, Eigen::Dynamic, Eigen::Dynamic > > result_matrix()
Return map referenced result as Eigen::Vector.
std::vector< uint > shape_
Shape of stored data (size of vector or number of rows and cols of matrix)
void allocate_const_result(ArenaVec< double > &value_vec)
ElemDomain domain_
Flag: BulkOp = 0, SideOp = 1.
void allocate_result(size_t data_size, PatchArena &arena)
const Eigen::Vector< ArenaVec< double >, Eigen::Dynamic > & raw_result() const
Same as previous but return const reference.
PatchPointValues< spacedim > & ppv() const
Return reference of PatchPointValues.
virtual void eval()=0
Reinit function of operation. Implementation in descendants.
uint n_dofs_
Number of DOFs of FE operations (or 1 in case of element operations)
ValueType elem_value(uint point_idx) const
PatchFEValues< spacedim > * patch_fe_
Pointer to PatchFEValues object.
ElemDomain
Distinguishes bulk and side domain.
OpSizeType
Distinguishes operations by type and size of output rows.
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc.