Skip to content
Snippets Groups Projects
Commit e486696c authored by webmanue's avatar webmanue
Browse files

Merge branch '25-add-quadrature-rules-for-tetrahedra' into 'master'

Resolve "Add quadrature rules for tetrahedra"

Closes #25

See merge request mechanics-and-materials/ae108!23
parents ff497dbb 47cb0a03
No related branches found
No related tags found
No related merge requests found
Pipeline #87093 canceled
......@@ -550,6 +550,130 @@ AE108_ELEMENTS_QUADRATURE_DEFINE(
{{-0.2812500000000000, +0.2604166666666667, +0.2604166666666667,
+0.2604166666666667}}});
// see G. Dhatt, G. Touzot, E. Lefrançois, "Finite Element Method"
// ISTE Ltd, London, 2012, p. 370
AE108_ELEMENTS_QUADRATURE_DEFINE(QuadratureType::Simplex, 3, 1, 1,
{
{{
{{
1. / 4.,
1. / 4.,
1. / 4.,
}},
}},
{{1. / 6.}},
});
// see G. Dhatt, G. Touzot, E. Lefrançois, "Finite Element Method"
// ISTE Ltd, London, 2012, p. 370
AE108_ELEMENTS_QUADRATURE_DEFINE(QuadratureType::Simplex, 3, 2, 4,
{
{{
{{
(5. - std::sqrt(5.)) / 20.,
(5. - std::sqrt(5.)) / 20.,
(5. - std::sqrt(5.)) / 20.,
}},
{{
(5. - std::sqrt(5.)) / 20.,
(5. - std::sqrt(5.)) / 20.,
(5. + 3. * std::sqrt(5.)) / 20.,
}},
{{
(5. - std::sqrt(5.)) / 20.,
(5. + 3. * std::sqrt(5.)) / 20.,
(5. - std::sqrt(5.)) / 20.,
}},
{{
(5. + 3. * std::sqrt(5.)) / 20.,
(5. - std::sqrt(5.)) / 20.,
(5. - std::sqrt(5.)) / 20.,
}},
}},
{{
1. / 24.,
1. / 24.,
1. / 24.,
1. / 24.,
}},
});
// see G. Dhatt, G. Touzot, E. Lefrançois, "Finite Element Method"
// ISTE Ltd, London, 2012, p. 370
AE108_ELEMENTS_QUADRATURE_DEFINE(QuadratureType::Simplex, 3, 3, 5,
{
{{
{{1. / 4., 1. / 4., 1. / 4.}},
{{1. / 6., 1. / 6., 1. / 6.}},
{{1. / 6., 1. / 6., 1. / 2.}},
{{1. / 6., 1. / 2., 1. / 6.}},
{{1. / 2., 1. / 6., 1. / 6.}},
}},
{{
-2. / 15.,
3. / 40.,
3. / 40.,
3. / 40.,
3. / 40.,
}},
});
// see G. Dhatt, G. Touzot, E. Lefrançois, "Finite Element Method"
// ISTE Ltd, London, 2012, p. 371
AE108_ELEMENTS_QUADRATURE_DEFINE(QuadratureType::Simplex, 3, 4, 11,
{
{{
{{1. / 4., 1. / 4., 1. / 4.}},
{{11. / 14., 1. / 14., 1. / 14.}},
{{1. / 14., 11. / 14., 1. / 14.}},
{{1. / 14., 1. / 14., 11. / 14.}},
{{1. / 14., 1. / 14., 1. / 14.}},
{{
std::sqrt(70.) / 56. + 1. / 4.,
std::sqrt(70.) / 56. + 1. / 4.,
-std::sqrt(70.) / 56. + 1. / 4.,
}},
{{
std::sqrt(70.) / 56. + 1. / 4.,
-std::sqrt(70.) / 56. + 1. / 4.,
std::sqrt(70.) / 56. + 1. / 4.,
}},
{{
std::sqrt(70.) / 56. + 1. / 4.,
-std::sqrt(70.) / 56. + 1. / 4.,
-std::sqrt(70.) / 56. + 1. / 4.,
}},
{{
-std::sqrt(70.) / 56. + 1. / 4.,
std::sqrt(70.) / 56. + 1. / 4.,
std::sqrt(70.) / 56. + 1. / 4.,
}},
{{
-std::sqrt(70.) / 56. + 1. / 4.,
-std::sqrt(70.) / 56. + 1. / 4.,
std::sqrt(70.) / 56. + 1. / 4.,
}},
{{
-std::sqrt(70.) / 56. + 1. / 4.,
std::sqrt(70.) / 56. + 1. / 4.,
-std::sqrt(70.) / 56. + 1. / 4.,
}},
}},
{{
-74. / 5625,
343. / 45000,
343. / 45000,
343. / 45000,
343. / 45000,
56. / 2250.,
56. / 2250.,
56. / 2250.,
56. / 2250.,
56. / 2250.,
56. / 2250.,
}},
});
template <QuadratureType Type_, std::size_t Dimension_, std::size_t Order_>
struct IntegrateTrait<Quadrature<Type_, Dimension_, Order_>> {
template <class Quadrature, class R, class F, class... Args>
......
......@@ -42,6 +42,11 @@ AE108_ELEMENTS_QUADRATURE_DEFINE_CC(QuadratureType::Simplex, 2, 1);
AE108_ELEMENTS_QUADRATURE_DEFINE_CC(QuadratureType::Simplex, 2, 2);
AE108_ELEMENTS_QUADRATURE_DEFINE_CC(QuadratureType::Simplex, 2, 3);
AE108_ELEMENTS_QUADRATURE_DEFINE_CC(QuadratureType::Simplex, 3, 1);
AE108_ELEMENTS_QUADRATURE_DEFINE_CC(QuadratureType::Simplex, 3, 2);
AE108_ELEMENTS_QUADRATURE_DEFINE_CC(QuadratureType::Simplex, 3, 3);
AE108_ELEMENTS_QUADRATURE_DEFINE_CC(QuadratureType::Simplex, 3, 4);
} // namespace quadrature
} // namespace elements
} // namespace ae108
\ No newline at end of file
......@@ -131,7 +131,11 @@ using Configurations = Types<Configuration<QuadratureType::Cube, 1, 1>,
Configuration<QuadratureType::Cube, 3, 9>,
Configuration<QuadratureType::Simplex, 2, 1>,
Configuration<QuadratureType::Simplex, 2, 2>,
Configuration<QuadratureType::Simplex, 2, 3>>;
Configuration<QuadratureType::Simplex, 2, 3>,
Configuration<QuadratureType::Simplex, 3, 1>,
Configuration<QuadratureType::Simplex, 3, 2>,
Configuration<QuadratureType::Simplex, 3, 3>,
Configuration<QuadratureType::Simplex, 3, 4>>;
INSTANTIATE_TYPED_TEST_CASE_P(Quadrature_Test, Quadrature_Test, Configurations);
struct Quadrature_1D_Test : Test {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment