21 #ifndef PATCH_POINT_VALUES_HH_
22 #define PATCH_POINT_VALUES_HH_
24 #include <Eigen/Dense>
35 template<
unsigned int spacedim>
class PatchOp;
36 template <
class ValueType>
class ElQ;
37 template <
class ValueType>
class FeQ;
142 template<
unsigned int spacedim = 3>
232 if (elOp ==
nullptr)
continue;
255 for (
uint i_col=0; i_col<coords.n_cols; ++i_col)
256 for (
uint i_row=0; i_row<coords.n_rows; ++i_row) {
257 coords_mat(i_row, i_col)(i_elem) = coords(i_row, i_col);
276 for (
uint i_col=0; i_col<elm_coords.n_cols; ++i_col)
277 for (
uint i_row=0; i_row<elm_coords.n_rows; ++i_row) {
278 coords_mat(i_row, i_col)(i_elem) = elm_coords(i_row, i_col);
286 for (
uint i_col=0; i_col<side_coords.n_cols; ++i_col)
287 for (
uint i_row=0; i_row<side_coords.n_rows; ++i_row) {
288 coords_mat(i_row, i_col)(i_elem) = side_coords(i_row, i_col);
306 uint point_pos = i_point_on_elem *
n_elems_ + elem_table_row;
325 uint point_pos = i_point_on_side *
n_elems_ + elem_table_row;
344 return make_fe_op(op_idx, shape, reinit_f, 1, size_type);
423 const auto &op_matrix =
operations_[op_idx]->raw_result();
425 for (
uint i=0; i<3; ++i)
426 val(i) = op_matrix(i)(op_matrix_idx);
438 const auto &op_matrix =
operations_[op_idx]->raw_result();
440 for (
uint i=0; i<3; ++i)
441 for (
uint j=0; j<3; ++j)
442 val(i,j) = op_matrix(i+j*spacedim)(op_matrix_idx);
466 auto op_matrix =
operations_[op_idx]->raw_result();
468 for (
uint i=0; i<3; ++i)
469 val(i) = op_matrix(i + 3*i_dof)(op_matrix_idx);
482 auto op_matrix =
operations_[op_idx]->raw_result();
484 for (
uint i=0; i<9; ++i)
485 val(i) = op_matrix(i+9*i_dof)(op_matrix_idx);
522 stream <<
"Point vals: " << std::endl;
524 if (op ==
nullptr)
continue;
525 auto mat = op->raw_result();
526 for (
uint i_mat=0; i_mat<
mat.rows()*
mat.cols(); ++i_mat) {
527 if (
mat(i_mat).data_size()==0) stream <<
"<empty>";
529 const double *vals =
mat(i_mat).data_ptr();
530 for (
size_t i_val=0; i_val<
mat(i_mat).data_size(); ++i_val)
531 stream << vals[i_val] <<
" ";
535 stream <<
" --- end of operation ---" << std::endl;
541 if (
int_table_(i_row).data_size()==0) stream <<
"<empty>";
544 for (
size_t i_val=0; i_val<
int_table_(i_row).data_size(); ++i_val)
545 stream << vals[i_val] <<
" ";
562 {
"weights",
"ref_scalar",
"ref_vector",
"ref_scalar_grad",
"ref_vector_grad",
"el_coords",
"jacobian",
"inv_jac",
"jac_det",
563 "pt_coords",
"JxW",
"scalar_shape",
"vector_shape",
"grad_scalar_shape",
"grad_vector_shape",
"vector_sym_grad",
"vector_divergence" },
564 {
"weights",
"ref_scalar",
"ref_vector",
"ref_scalar_grad",
"ref_vector_grad",
"el_coords",
"el_jac",
"el_inv_jac",
"side_coords",
565 "side_jac",
"side_jac_det",
"pt_coords",
"JxW",
"normal_vec",
"scalar_shape",
"vector_shape",
"grad_scalar_shape",
"grad_vector_shape",
566 "vector_sym_grad",
"vector_divergence" }
568 stream << std::setfill(
' ') <<
" Operation" << setw(12) <<
"" <<
"Shape" << setw(2) <<
""
569 <<
"n DOFs" << setw(2) <<
"" <<
"Input operations" << endl;
572 stream <<
" " << std::left << setw(20) << op_names[bulk_side][i] <<
"" <<
" " << setw(6) <<
operations_[i]->format_shape() <<
"" <<
" "
573 << setw(7) <<
operations_[i]->n_dofs() <<
"" <<
" ";
575 for (
auto i_o :
op_dependency_[i]) stream << op_names[bulk_side][i_o] <<
" ";
622 friend class PatchOp<spacedim>;
623 template <
class ValueType>
625 template <
class ValueType>
627 template<
unsigned int dim>
629 template<
unsigned int dim>
631 template<
unsigned int dim>
638 template<
unsigned int spacedim = 3>
655 if (shape_vec.size() == 1) shape_vec.push_back(1);
723 Eigen::Map<Eigen::Matrix<ArenaVec<double>, Eigen::Dynamic, Eigen::Dynamic>>
result_matrix() {
724 return Eigen::Map<Eigen::Matrix<ArenaVec<double>, Eigen::Dynamic, Eigen::Dynamic>>(
result_.data(),
shape_[0],
shape_[1]);
731 return Eigen::Map<Eigen::Matrix<ArenaVec<double>, Eigen::Dynamic, Eigen::Dynamic>>(
result_.data()+i_dof*n_dof_comps,
shape_[0],
shape_[1] /
n_dofs_);
735 Eigen::Vector<ArenaVec<double>, Eigen::Dynamic> &
raw_result() {
740 const Eigen::Vector<ArenaVec<double>, Eigen::Dynamic> &
raw_result()
const {
748 Eigen::Vector<ArenaVec<double>, Eigen::Dynamic>
result_;
764 template<
unsigned int dim>
768 auto coords_value = result_op->
input_ops(0)->result_matrix();
769 for (
unsigned int i=0; i<3; i++)
770 for (
unsigned int j=0; j<dim; j++)
771 jac_value(i,j) = coords_value(i,j+1) - coords_value(i,0);
774 template<
unsigned int dim>
778 auto jac_value = result_op->
input_ops(0)->result_matrix();
779 inv_jac_value = eigen_arena_tools::inverse<3, dim>(jac_value);
782 template<
unsigned int dim>
786 auto jac_value = result_op->
input_ops(0)->result_matrix();
787 jac_det_value(0) = eigen_arena_tools::determinant<3, dim>(jac_value).abs();
791 auto weights_value = result_op->
input_ops(0)->result_matrix();
792 auto jac_det_value = result_op->
input_ops(1)->result_matrix();
797 jxw_value(0,0) = jxw_ovec.
get_vec();
802 for (
uint i_dof=0; i_dof<result_op->
n_dofs(); ++i_dof) {
803 Eigen::Map< Eigen::Matrix<ArenaVec<double>, Eigen::Dynamic, Eigen::Dynamic> > grad_vector_dof = result_op->
input_ops(0)->result_sub_matrix(i_dof);
804 Eigen::Map< Eigen::Matrix<ArenaVec<double>, Eigen::Dynamic, Eigen::Dynamic> > sym_grad_dof = result_op->
result_sub_matrix(i_dof);
805 sym_grad_dof = 0.5 * (grad_vector_dof.transpose() + grad_vector_dof);
812 for (
uint i_dof=0; i_dof<result_op->
n_dofs(); ++i_dof) {
813 Eigen::Map< Eigen::Matrix<ArenaVec<double>, Eigen::Dynamic, Eigen::Dynamic> > grad_vector_dof = result_op->
input_ops(0)->result_sub_matrix(i_dof);
814 divergence_value(i_dof) = grad_vector_dof(0,0) + grad_vector_dof(1,1) + grad_vector_dof(2,2);
822 template<
unsigned int dim>
824 common_reinit::elop_jac<dim>(result_op);
826 template<
unsigned int dim>
828 common_reinit::elop_inv_jac<dim>(result_op);
830 template<
unsigned int dim>
832 common_reinit::elop_jac_det<dim>(result_op);
843 auto ref_vec = result_op->
input_ops(0)->result_matrix();
847 uint n_elem = result_vec(0).data_size() / ref_vec(0).data_size();
850 for (
uint i=0; i<n_elem; ++i) {
855 Eigen::Vector<ArenaOVec<double>, Eigen::Dynamic> ref_ovec(n_dofs);
856 for (
uint i=0; i<n_dofs; ++i) {
860 Eigen::Vector<ArenaOVec<double>, Eigen::Dynamic> result_ovec = elem_ovec * ref_ovec;
861 for (
uint i=0; i<n_dofs; ++i) {
862 result_vec(i) = result_ovec(i).
get_vec();
866 auto ref_shape_vec = result_op->
input_ops(0)->result_matrix();
870 uint n_elem = result_vec(0).data_size() / ref_shape_vec(0).data_size();
873 for (
uint i=0; i<n_elem; ++i) {
878 Eigen::Matrix<ArenaOVec<double>, Eigen::Dynamic, Eigen::Dynamic> ref_shape_ovec(3, n_dofs);
879 for (
uint c=0; c<3*n_dofs; ++c) {
880 ref_shape_ovec(c) =
ArenaOVec(ref_shape_vec(c));
883 Eigen::Matrix<ArenaOVec<double>, Eigen::Dynamic, Eigen::Dynamic> result_ovec = elem_ovec * ref_shape_ovec;
884 for (
uint c=0; c<3*n_dofs; ++c)
885 result_vec(c) = result_ovec(c).
get_vec();
899 template<
unsigned int dim>
901 auto inv_jac_vec = result_op->
input_ops(0)->result_matrix();
902 auto ref_grads_vec = result_op->
input_ops(1)->result_matrix();
906 Eigen::Matrix<ArenaOVec<double>, Eigen::Dynamic, Eigen::Dynamic> ref_grads_ovec(dim, n_dofs);
907 for (
uint i=0; i<dim*n_dofs; ++i) {
908 ref_grads_ovec(i) =
ArenaOVec(ref_grads_vec(i));
911 Eigen::Matrix<ArenaOVec<double>, dim, 3> inv_jac_ovec;
912 for (
uint i=0; i<dim*3; ++i) {
913 inv_jac_ovec(i) =
ArenaOVec(inv_jac_vec(i));
917 Eigen::Matrix<ArenaOVec<double>, Eigen::Dynamic, Eigen::Dynamic> result_ovec = inv_jac_ovec.transpose() * ref_grads_ovec;
918 for (
uint i=0; i<3*n_dofs; ++i) {
919 result_vec(i) = result_ovec(i).get_vec();
922 template<
unsigned int dim>
924 auto inv_jac_vec = result_op->
input_ops(0)->result_matrix();
925 auto ref_grads_vec = result_op->
input_ops(1)->result_matrix();
930 Eigen::Matrix<ArenaOVec<double>, dim, 3> inv_jac_ovec;
931 for (
uint i=0; i<dim*3; ++i) {
932 inv_jac_ovec(i) =
ArenaOVec(inv_jac_vec(i));
935 Eigen::Matrix<ArenaOVec<double>, dim, 3> ref_grads_ovec;
936 for (
uint i_dof=0; i_dof<n_dofs; ++i_dof) {
937 for (
uint i=0; i<3*dim; ++i) {
938 ref_grads_ovec(i) =
ArenaOVec(ref_grads_vec(i_dof*3*dim + i));
941 Eigen::Matrix<ArenaOVec<double>, 3, 3> result_ovec = inv_jac_ovec.transpose() * ref_grads_ovec;
942 for (
uint i=0; i<3; ++i) {
943 for (
uint j=0; j<3; ++j) {
944 result_vec(j,i+3*i_dof) = result_ovec(i,j).get_vec();
949 template<
unsigned int dim>
951 template<
unsigned int dim>
960 template<
unsigned int dim>
962 common_reinit::elop_jac<dim>(result_op);
964 template<
unsigned int dim>
966 common_reinit::elop_inv_jac<dim>(result_op);
968 template<
unsigned int dim>
973 template<
unsigned int dim>
985 template<
unsigned int dim>
988 auto inv_jac_value = result_op->
input_ops(0)->result_matrix();
991 ArenaVec<double> norm_vec( normal_value(0).data_size(), normal_value(0).arena() );
992 Eigen::VectorXd A(3);
993 for (
uint i=0; i<normal_value(0).data_size(); ++i) {
994 A(0) = normal_value(0)(i);
995 A(1) = normal_value(1)(i);
996 A(2) = normal_value(2)(i);
997 norm_vec(i) = A.norm();
1000 for (
uint i=0; i<3; ++i) {
1001 normal_value(i) = normal_value(i) / norm_vec;
1005 auto ref_vec = result_op->
input_ops(0)->result_matrix();
1009 uint n_sides = el_table(3).data_size();
1010 uint n_patch_points = el_table(4).data_size();
1012 for (
uint i_dof=0; i_dof<n_dofs; ++i_dof) {
1013 for (
uint i_pt=0; i_pt<n_patch_points; ++i_pt) {
1014 result_vec(i_dof)(i_pt) = ref_vec(el_table(4)(i_pt), i_dof)(i_pt / n_sides);
1021 auto ref_shape_vec = result_op->
input_ops(0)->result_matrix();
1025 uint n_sides = el_table(3).data_size();
1026 uint n_patch_points = el_table(4).data_size();
1028 for (
uint c=0; c<3*n_dofs; c++)
1031 for (
uint i_dof=0; i_dof<n_dofs; ++i_dof) {
1032 for (
uint i_pt=0; i_pt<n_patch_points; ++i_pt)
1033 for (
uint c=0; c<3; c++)
1034 result_vec(c,i_dof)(i_pt) = ref_shape_vec(el_table(4)(i_pt),3*i_dof+c)(i_pt / n_sides);
1038 template<
unsigned int dim>
1040 auto ref_shape_grads = result_op->
input_ops(1)->result_matrix();
1044 uint n_points = ref_shape_grads(0).data_size();
1045 uint n_sides = el_table(3).data_size();
1046 uint n_patch_points = el_table(4).data_size();
1049 auto inv_jac_value = result_op->
input_ops(0)->result_matrix();
1050 Eigen::Matrix<ArenaVec<double>, dim, 3> inv_jac_expd_value;
1051 for (
uint i=0; i<dim*3; ++i) {
1052 inv_jac_expd_value(i) =
ArenaVec<double>( n_patch_points, inv_jac_value(i).arena() );
1053 for (
uint j=0; j<n_patch_points; ++j)
1054 inv_jac_expd_value(i)(j) = inv_jac_value(i)(j%n_sides);
1058 Eigen::Matrix<ArenaVec<double>, Eigen::Dynamic, Eigen::Dynamic> ref_shape_grads_expd(dim, n_dofs);
1059 for (
uint i=0; i<dim*n_dofs; ++i) {
1060 ref_shape_grads_expd(i) =
ArenaVec<double>( n_patch_points, inv_jac_value(0).arena() );
1062 for (
uint i_dof=0; i_dof<n_dofs; ++i_dof) {
1063 for (
uint i_pt=0; i_pt<n_points; ++i_pt) {
1064 uint i_begin = i_pt * n_sides;
1065 for (
uint i_sd=0; i_sd<n_sides; ++i_sd) {
1066 for (
uint i_c=0; i_c<dim; ++i_c) {
1067 ref_shape_grads_expd(i_c, i_dof)(i_begin + i_sd) = ref_shape_grads(el_table(3)(i_sd), i_dof*dim+i_c)(i_pt);
1074 grad_scalar_shape_value = inv_jac_expd_value.transpose() * ref_shape_grads_expd;
1076 template<
unsigned int dim>
1079 auto inv_jac_value = result_op->
input_ops(0)->result_matrix();
1080 auto ref_vector_grad = result_op->
input_ops(1)->result_matrix();
1083 uint n_points = ref_vector_grad(0).data_size();
1084 uint n_patch_sides = el_table(3).data_size();
1085 uint n_patch_points = el_table(4).data_size();
1088 Eigen::Matrix<ArenaVec<double>, dim, 3> inv_jac_expd_value;
1089 for (
uint i=0; i<dim*3; ++i) {
1090 inv_jac_expd_value(i) =
ArenaVec<double>( n_patch_points, inv_jac_value(i).arena() );
1091 for (
uint j=0; j<n_patch_points; ++j)
1092 inv_jac_expd_value(i)(j) = inv_jac_value(i)(j%n_patch_sides);
1096 Eigen::Matrix<ArenaVec<double>, dim, 3> ref_shape_grads_expd;
1097 for (
uint i=0; i<3*dim; ++i) {
1098 ref_shape_grads_expd(i) =
ArenaVec<double>( n_patch_points, inv_jac_value(0).arena() );
1100 for (
uint i_dof=0; i_dof<n_dofs; ++i_dof) {
1102 for (
uint i_pt=0; i_pt<n_points; ++i_pt) {
1103 uint i_begin = i_pt * n_patch_sides;
1104 for (
uint i_sd=0; i_sd<n_patch_sides; ++i_sd) {
1105 for (
uint i_dim=0; i_dim<dim; ++i_dim) {
1106 for (
uint i_c=0; i_c<3; ++i_c) {
1107 ref_shape_grads_expd(i_dim, i_c)(i_begin + i_sd) = ref_vector_grad(el_table(3)(i_sd)*dim+i_dim, 3*i_dof+i_c)(i_pt);
1114 Eigen::Map< Eigen::Matrix<ArenaVec<double>, Eigen::Dynamic, Eigen::Dynamic> > res_submat = result_op->
result_sub_matrix(i_dof);
1115 res_submat = (inv_jac_expd_value.transpose() * ref_shape_grads_expd).transpose();
1118 template<
unsigned int dim>
1120 template<
unsigned int dim>
1133 for (
uint i=0;i<result_vec(0).data_size(); ++i) {
1134 result_vec(0,0)(i) = 1.0;
1148 template<
unsigned int spacedim = 3>
1151 typedef typename ::PatchPointValues<spacedim>::PatchFeData
PatchFeData;
1206 template<
unsigned int dim>
1212 weights->allocate_result(point_weights_vec.size(), this->patch_fe_data_.asm_arena_);
1213 auto weights_value = weights->result_matrix();
1214 for (
uint i=0; i<point_weights_vec.size(); ++i)
1215 weights_value(0)(i) = point_weights_vec[i];
1240 template<
unsigned int spacedim = 3>
1243 typedef typename ::PatchPointValues<spacedim>::PatchFeData
PatchFeData;
1301 template<
unsigned int dim>
1307 weights->allocate_result(point_weights_vec.size(), this->patch_fe_data_.asm_arena_);
1308 auto weights_value = weights->result_matrix();
1309 for (
uint i=0; i<point_weights_vec.size(); ++i)
1310 weights_value(0)(i) = point_weights_vec[i];
#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_PTR(ptr)
Definition of assert macro checking non-null pointer (PTR) only for debug mode.
ArenaVec< T > get_vec() const
Convert ArenaOVec to ArenaVec and its.
void create_zero_values() override
Create zero_values_ object.
PatchPointValues(uint dim, uint quad_order, PatchFeData &patch_fe_data)
Constructor.
PatchPointValues(uint dim, std::vector< PatchOp< spacedim > * > &operations, PatchFeData &patch_fe_data)
Specialized constructor of zero values object. Do not use in other cases!
~PatchPointValues()
Destructor.
::PatchPointValues< spacedim >::PatchFeData PatchFeData
void init()
Initialize operations vector.
Bulk Side specialization, order of item in operations_ vector corresponds to the SideOps enum.
~PatchPointValues()
Destructor.
void create_zero_values() override
Create zero_values_ object.
PatchPointValues(uint dim, std::vector< PatchOp< spacedim > * > &operations, PatchFeData &patch_fe_data)
Specialized constructor of zero values object. Do not use in other cases!
void init()
Initialize operations vector.
::PatchPointValues< spacedim >::PatchFeData PatchFeData
PatchPointValues(uint dim, uint quad_order, PatchFeData &patch_fe_data)
Constructor.
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.
void reinit_function(FMT_UNUSED std::vector< PatchOp< spacedim > * > &operations, IntTableArena &int_table)
Call reinit function on element table if function is defined.
PatchOp(uint dim, std::initializer_list< uint > shape, ReinitFunction reinit_f, OpSizeType size_type, std::vector< PatchOp< spacedim > * > input_ops={}, uint n_dofs=1)
uint dim() const
Getter for dimension.
uint n_dofs() const
Getter for n_dofs_.
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.
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)
const std::vector< uint > & shape() const
Getter for shape_.
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)
void allocate_result(size_t data_size, PatchArena &arena)
ReinitFunction reinit_func
Pointer to patch reinit function of element data table specialized by operation.
const Eigen::Vector< ArenaVec< double >, Eigen::Dynamic > & raw_result() const
Same as previous but return const reference.
uint n_dofs_
Number of DOFs of FE operations (or 1 in case of element operations)
void print_data_tables(ostream &stream, bool points, bool ints) const
PatchPointValues * zero_values()
PatchArena & patch_arena() const
return reference to patch arena
Scalar scalar_elem_value(uint op_idx, uint point_idx) const
PatchPointValues(uint dim, PatchFeData &patch_fe_data)
std::vector< uint > points_map_
Map of point patch indices to PatchOp::result_ and int_table_ tables.
uint register_bulk_point(uint elem_table_row, uint value_patch_idx, uint elem_idx, uint i_point_on_elem)
uint register_element(arma::mat coords, uint element_patch_idx)
void resize_tables(uint n_elems, uint n_points)
Resize data tables. Method is called before reinit of patch.
PatchOp< spacedim > * make_new_op(uint op_idx, std::initializer_list< uint > shape, ReinitFunction reinit_f, OpSizeType size_type=pointOp)
friend class PatchOp< spacedim >
Tensor tensor_elem_value(uint op_idx, uint point_idx) const
Quadrature * get_quadrature() const
Getter for quadrature.
PatchOp< spacedim > * make_fe_op(uint op_idx, std::initializer_list< uint > shape, ReinitFunction reinit_f, uint n_dofs, OpSizeType size_type=pointOp)
uint n_elems() const
Getter for n_elems_.
uint i_elem_
Index of registered element in table, helper value used during patch creating.
PatchFeData & patch_fe_data_
Reference to PatchFeData structure shared with PatchFeValues.
void reset()
Reset number of columns (points and elements)
uint n_points() const
Getter for n_points_.
std::vector< uint > elements_map_
Map of element patch indices to PatchOp::result_ and int_table_ tables.
uint dim() const
Getter for dim_.
Tensor tensor_value(uint op_idx, uint point_idx, uint i_dof=0) const
Scalar scalar_value(uint op_idx, uint point_idx, uint i_dof=0) const
void zero_values_needed()
Set flag needs_zero_values_ to true.
uint register_side(arma::mat elm_coords, arma::mat side_coords, uint side_idx)
PatchOp< spacedim > * make_fixed_fe_op(uint op_idx, std::initializer_list< uint > shape, ReinitFunction reinit_f, uint n_dofs)
AssemblyArena & asm_arena() const
return reference to assembly arena
uint register_side_point(uint elem_table_row, uint value_patch_idx, uint elem_idx, uint side_idx, uint i_point_on_side)
PatchOp< spacedim > * make_fixed_op(uint op_idx, std::initializer_list< uint > shape, ReinitFunction reinit_f)
virtual void create_zero_values()=0
Create zero_values_ object.
virtual ~PatchPointValues()
uint n_points_
Number of points in patch.
void print_operations(ostream &stream, uint bulk_side) const
Quadrature * quad_
Quadrature of given dimension and order passed in constructor.
Vector vector_elem_value(uint op_idx, uint point_idx) const
PatchPointValues * zero_values_
PatchPointValues object returns zero values for all operations.
std::vector< std::vector< unsigned int > > op_dependency_
Holds dependency between operations.
std::vector< OpSizeType > int_sizes_
Set size and type of rows of int_table_, value is set implicitly in constructor of descendants.
Vector vector_value(uint op_idx, uint point_idx, uint i_dof=0) const
uint n_elems_
Number of elements in patch.
std::vector< PatchOp< spacedim > * > operations_
Vector of all defined operations.
bool needs_zero_values_
Flags hold whether zero_values_ object is needed.
void create_zero_operations(std::vector< PatchOp< spacedim > * > &ref_ops)
Symmetric Gauss-Legendre quadrature formulae on simplices.
Base class for quadrature rules on simplices in arbitrary dimensions.
const std::vector< double > & get_weights() const
Return a reference to the whole array of weights.
static Eigen::Matrix< ArenaVec< double >, dim, 1 > normal_vector_array(ArenaVec< uint > loc_side_idx_vec)
Class ElementValues calculates data related to transformation of reference cell to actual cell (Jacob...
ArmaMat< double, N, M > mat
@ opVectorSymGrad
Vector symmetric gradient.
@ opVectorDivergence
Vector divergence.
@ opScalarShape
FE operations.
@ opCoords
operations evaluated on quadrature points
@ opVectorShape
Vector shape operation.
@ opRefScalarGrad
Gradient scalar reference.
@ opGradVectorShape
Vector shape gradient.
@ opInvJac
inverse Jacobian
@ opGradScalarShape
Scalar shape gradient.
@ opWeights
fixed operations (reference data filled once during initialization)
@ opNItems
Holds number of valid FE operations and value of invalid FE operation.
@ opJac
Jacobian of element.
@ opElCoords
operations evaluated on elements
@ opRefVector
Vector reference.
@ opRefScalar
Scalar reference.
@ opGradVectorShape
Vector shape gradient.
@ opRefScalarGrad
Gradient scalar reference.
@ opSideCoords
operations evaluated on sides
@ opVectorDivergence
Vector divergence.
@ opJxW
JxW value of quadrature point.
@ opCoords
operations evaluated on quadrature points
@ opNItems
Holds number of valid FE operations and value of invalid FE operation.
@ opGradScalarShape
Scalar shape gradient.
@ opVectorShape
Vector shape operation.
@ opVectorSymGrad
Vector symmetric gradient.
@ opElCoords
operations evaluated on elements
@ opScalarShape
FE operations.
@ opRefScalar
Scalar reference.
@ opElJac
Jacobian of element.
@ opWeights
fixed operations (reference data filled once during initialization)
@ opSideJac
Jacobian of element.
@ opRefVector
Vector reference.
std::function< void(PatchOp< 3 > *, IntTableArena &)> ReinitFunction
Type for conciseness.
OpSizeType
Distinguishes operations by type and size of output rows.
@ pointOp
operation is evaluated on quadrature points
@ elemOp
operation is evaluated on elements or sides
@ fixedSizeOp
operation has fixed size and it is filled during initialization
Definitions of particular quadrature rules on simplices.
AssemblyArena asm_arena_
Assembly arena, created and filled once during initialization.
ArenaVec< double > zero_vec_
ArenaVec of zero values of maximal length using in zero PatchPointValues construction.
~PatchFeData()
Destructor.
PatchFeData(size_t buffer_size, size_t simd_alignment)
Constructor.
PatchArena * patch_arena_
Patch arena, reseted before patch reinit.
Defines reinit operations on bulk points.
static void ptop_vector_shape_grads(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_vector_contravariant_shape_grads(FMT_UNUSED PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_scalar_shape_grads(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void elop_jac(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_vector_piola_shape(FMT_UNUSED PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_JxW(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_scalar_shape(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void elop_jac_det(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_vector_contravariant_shape(FMT_UNUSED PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void elop_inv_jac(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_vector_shape(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_coords(FMT_UNUSED PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_vector_piola_shape_grads(FMT_UNUSED PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
Defines common functionality of reinit operations.
static void elop_jac(PatchOp< 3 > *result_op)
static void op_base(FMT_UNUSED PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_vector_sym_grad(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
Common reinit function of vector symmetric gradient on bulk and side points.
static void ptop_vector_divergence(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
Common reinit function of vector divergence on bulk and side points.
static void ptop_JxW(PatchOp< 3 > *result_op)
static void elop_jac_det(PatchOp< 3 > *result_op)
static void elop_inv_jac(PatchOp< 3 > *result_op)
Defines reinit operations on side points.
static void ptop_vector_contravariant_shape(FMT_UNUSED PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_normal_vec(PatchOp< 3 > *result_op, IntTableArena &el_table)
static void ptop_vector_shape(PatchOp< 3 > *result_op, IntTableArena &el_table)
static void ptop_vector_contravariant_shape_grads(FMT_UNUSED PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_vector_piola_shape(FMT_UNUSED PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_vector_shape_grads(PatchOp< 3 > *result_op, IntTableArena &el_table)
static void ptop_scalar_shape_grads(PatchOp< 3 > *result_op, IntTableArena &el_table)
static void ptop_vector_piola_shape_grads(FMT_UNUSED PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_scalar_shape(PatchOp< 3 > *result_op, IntTableArena &el_table)
static void elop_sd_jac_det(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void elop_el_jac(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_JxW(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void ptop_coords(FMT_UNUSED PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void elop_el_inv_jac(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)
static void elop_sd_jac(PatchOp< 3 > *result_op, FMT_UNUSED IntTableArena &el_table)