32 template <
unsigned int dim>
36 std::shared_ptr<BulkIntegral> bulk_integral = std::make_shared<BulkIntegral>(shared_from_this(), dim);
44 std::shared_ptr<BulkIntegral> EvalPoints::add_bulk<0>(
const Quadrature &quad)
47 std::shared_ptr<BulkIntegral> bulk_integral = std::make_shared<BulkIntegral>(shared_from_this(), 0);
53 template <
unsigned int dim>
57 unsigned int old_data_size=this->
size(dim), new_data_size;
61 std::shared_ptr<EdgeIntegral> edge_integral = std::make_shared<EdgeIntegral>(shared_from_this(), dim, n_side_permutations, points_per_side);
62 unsigned int*** perm_indices = edge_integral->perm_indices_;
65 for (
unsigned int i=0; i<dim+1; ++i) {
70 new_data_size = this->
size(dim);
71 unsigned int i_data=old_data_size;
72 for (
unsigned int i_side=0; i_side<dim+1; ++i_side) {
73 for (
unsigned int i_point=0; i_point<points_per_side; ++i_point) {
74 perm_indices[i_side][0][i_point] = i_data;
80 for (
unsigned int i_perm=1; i_perm<n_side_permutations; ++i_perm) {
81 for (
unsigned int i_side=0; i_side<dim+1; ++i_side) {
84 for (
unsigned int i_point=0; i_point<quad_points.size(); ++i_point) {
85 perm_indices[i_side][i_perm][i_point] =
dim_eval_points_[dim].find_permute_point<dim>( quad_points.vec<dim>(i_point), old_data_size, new_data_size );
94 template <
unsigned int dim>
98 std::shared_ptr<BulkIntegral> bulk_integral = this->
add_bulk<dim-1>(quad);
99 std::shared_ptr<EdgeIntegral> edge_integral = this->add_edge<dim>(quad);
100 return std::make_shared<CouplingIntegral>(edge_integral, bulk_integral);
103 template <
unsigned int dim>
106 std::shared_ptr<BulkIntegral> bulk_integral = this->
add_bulk<dim-1>(quad);
107 std::shared_ptr<EdgeIntegral> edge_integral = this->add_edge<dim>(quad);
108 return std::make_shared<BoundaryIntegral>(edge_integral, bulk_integral);
112 : local_points_(dim), n_subsets_(0), dim_(dim)
118 template <
unsigned int dim>
120 ASSERT_GT(dim, 0).error(
"Dimension 0 not supported!\n");
121 unsigned int local_points_old_size = local_points_.size();
122 local_points_.resize(quad_points.
size() + local_points_old_size);
123 for (
unsigned int i=0; i<quad_points.
size(); ++i) {
124 local_points_.set(i+local_points_old_size) = quad_points.
vec<dim>(i);
128 template <
unsigned int dim>
130 ASSERT_GT(dim, 0).error(
"Dimension 0 not supported!\n");
131 for (
unsigned int loc_idx=data_begin; loc_idx<data_end; ++loc_idx) {
133 if ( arma::norm(coords-local_points_.vec<dim>(loc_idx), 2) < 4*std::numeric_limits<double>::epsilon() )
return loc_idx;
144 subset_starts_[n_subsets_] = this->
size();
148 template std::shared_ptr<BulkIntegral> EvalPoints::add_bulk<0>(
const Quadrature &);
149 template std::shared_ptr<BulkIntegral> EvalPoints::add_bulk<1>(
const Quadrature &);
150 template std::shared_ptr<BulkIntegral> EvalPoints::add_bulk<2>(
const Quadrature &);
151 template std::shared_ptr<BulkIntegral> EvalPoints::add_bulk<3>(
const Quadrature &);
152 template std::shared_ptr<EdgeIntegral> EvalPoints::add_edge<1>(
const Quadrature &);
153 template std::shared_ptr<EdgeIntegral> EvalPoints::add_edge<2>(
const Quadrature &);
154 template std::shared_ptr<EdgeIntegral> EvalPoints::add_edge<3>(
const Quadrature &);
155 template std::shared_ptr<CouplingIntegral> EvalPoints::add_coupling<2>(
const Quadrature &);
156 template std::shared_ptr<CouplingIntegral> EvalPoints::add_coupling<3>(
const Quadrature &);
157 template std::shared_ptr<BoundaryIntegral> EvalPoints::add_boundary<1>(
const Quadrature &);
158 template std::shared_ptr<BoundaryIntegral> EvalPoints::add_boundary<2>(
const Quadrature &);
159 template std::shared_ptr<BoundaryIntegral> EvalPoints::add_boundary<3>(
const Quadrature &);
163 template unsigned int EvalPoints::DimEvalPoints::find_permute_point<1>(
arma::vec,
unsigned int,
unsigned int);
164 template unsigned int EvalPoints::DimEvalPoints::find_permute_point<2>(
arma::vec,
unsigned int,
unsigned int);
165 template unsigned int EvalPoints::DimEvalPoints::find_permute_point<3>(
arma::vec,
unsigned int,
unsigned int);