diff --git a/NumLib/Fem/Integration/IntegrationGaussLegendrePrism.h b/NumLib/Fem/Integration/IntegrationGaussLegendrePrism.h index 0929e982733808004052974ceb62e6127b900409..426e503598988377710051e01d91eb923d5f8c5d 100644 --- a/NumLib/Fem/Integration/IntegrationGaussLegendrePrism.h +++ b/NumLib/Fem/Integration/IntegrationGaussLegendrePrism.h @@ -12,7 +12,7 @@ #include "MathLib/Integration/GaussLegendre.h" #include "MathLib/Integration/GaussLegendreTri.h" -#include "MathLib/TemplateWeightedPoint.h" +#include "MathLib/WeightedPoint.h" namespace NumLib { @@ -22,8 +22,6 @@ namespace NumLib class IntegrationGaussLegendrePrism { public: - using WeightedPoint = MathLib::TemplateWeightedPoint<double, double, 3>; - /** * Construct this object with the given integration order * @@ -50,7 +48,7 @@ public: // clang-format off /// \copydoc NumLib::IntegrationGaussLegendreRegular::getWeightedPoint(unsigned) const // clang-format on - WeightedPoint getWeightedPoint(unsigned igp) const + MathLib::WeightedPoint getWeightedPoint(unsigned igp) const { return getWeightedPoint(getIntegrationOrder(), igp); } @@ -58,7 +56,7 @@ public: // clang-format off /// \copydoc NumLib::IntegrationGaussLegendreRegular::getWeightedPoint(unsigned, unsigned) // clang-format on - static WeightedPoint getWeightedPoint(unsigned order, unsigned igp) + static MathLib::WeightedPoint getWeightedPoint(unsigned const order, unsigned const igp) { (void)order; const unsigned gp_r = igp % 3; @@ -69,11 +67,11 @@ public: rst[2] = MathLib::GaussLegendre<2>::X[gp_t]; double w = MathLib::GaussLegendreTri<2>::W[gp_r] * 0.5 * MathLib::GaussLegendre<2>::W[gp_t]; - return WeightedPoint(rst, w); + return MathLib::WeightedPoint(rst, w); } template <typename Method> - static WeightedPoint getWeightedPoint(unsigned igp) + static MathLib::WeightedPoint getWeightedPoint(unsigned const igp) { return WeightedPoint(Method::X[igp], Method::W[igp]); } diff --git a/NumLib/Fem/Integration/IntegrationGaussLegendrePyramid.h b/NumLib/Fem/Integration/IntegrationGaussLegendrePyramid.h index 459b3cd99bb5f86c7f602a6ce2643e502ed833f6..9544e6f9e6605473988bb3fac1bf937c63f8701e 100644 --- a/NumLib/Fem/Integration/IntegrationGaussLegendrePyramid.h +++ b/NumLib/Fem/Integration/IntegrationGaussLegendrePyramid.h @@ -12,7 +12,7 @@ #include "BaseLib/Error.h" #include "MathLib/Integration/GaussLegendrePyramid.h" -#include "MathLib/TemplateWeightedPoint.h" +#include "MathLib/WeightedPoint.h" namespace NumLib { @@ -22,8 +22,6 @@ namespace NumLib class IntegrationGaussLegendrePyramid { public: - using WeightedPoint = MathLib::TemplateWeightedPoint<double, double, 3>; - /** * Construct this object with the given integration order * @@ -53,7 +51,7 @@ public: * @param igp The integration point index * @return a weighted point */ - WeightedPoint getWeightedPoint(unsigned igp) const + MathLib::WeightedPoint getWeightedPoint(unsigned const igp) const { return getWeightedPoint(getIntegrationOrder(), igp); } @@ -65,7 +63,7 @@ public: * @param igp the sampling point id * @return weight */ - static WeightedPoint getWeightedPoint(unsigned order, unsigned igp) + static MathLib::WeightedPoint getWeightedPoint(unsigned const order, unsigned const igp) { switch (order) { @@ -81,9 +79,9 @@ public: } template <typename Method> - static WeightedPoint getWeightedPoint(unsigned igp) + static MathLib::WeightedPoint getWeightedPoint(unsigned igp) { - return WeightedPoint(Method::X[igp], Method::W[igp]); + return MathLib::WeightedPoint(Method::X[igp], Method::W[igp]); } /** diff --git a/NumLib/Fem/Integration/IntegrationGaussLegendreRegular-impl.h b/NumLib/Fem/Integration/IntegrationGaussLegendreRegular-impl.h index e0dbb988278c63e51e8170f95828bb03f8679987..7b5141840590786519435c8b9725060489c53211 100644 --- a/NumLib/Fem/Integration/IntegrationGaussLegendreRegular-impl.h +++ b/NumLib/Fem/Integration/IntegrationGaussLegendreRegular-impl.h @@ -52,9 +52,9 @@ IntegrationGaussLegendreRegular<3>::getPositionIndices(unsigned order, } template <unsigned N_DIM> -inline MathLib::TemplateWeightedPoint<double, double, N_DIM> -IntegrationGaussLegendreRegular<N_DIM>::getWeightedPoint(unsigned order, - unsigned igp) +inline MathLib::WeightedPoint +IntegrationGaussLegendreRegular<N_DIM>::getWeightedPoint(unsigned const order, + unsigned const igp) { assert(igp < std::pow(order, N_DIM)); std::array<unsigned, N_DIM> const pos = getPositionIndices(order, igp); @@ -75,7 +75,7 @@ IntegrationGaussLegendreRegular<N_DIM>::getWeightedPoint(unsigned order, template <unsigned N_DIM> template <typename Method> -inline MathLib::TemplateWeightedPoint<double, double, N_DIM> +inline MathLib::WeightedPoint IntegrationGaussLegendreRegular<N_DIM>::getWeightedPoint( std::array<unsigned, N_DIM> const& pos) { @@ -87,7 +87,6 @@ IntegrationGaussLegendreRegular<N_DIM>::getWeightedPoint( weight *= Method::W[pos[d]]; } - return MathLib::TemplateWeightedPoint<double, double, N_DIM>(coords, - weight); + return MathLib::WeightedPoint(coords, weight); } } // namespace NumLib diff --git a/NumLib/Fem/Integration/IntegrationGaussLegendreRegular.h b/NumLib/Fem/Integration/IntegrationGaussLegendreRegular.h index 02151c0889975410dd7131b6a31877d6b43c884b..3ff2856bf820313e01344246e128a40a554b7b4e 100644 --- a/NumLib/Fem/Integration/IntegrationGaussLegendreRegular.h +++ b/NumLib/Fem/Integration/IntegrationGaussLegendreRegular.h @@ -17,7 +17,7 @@ #include "BaseLib/Error.h" #include "MathLib/Integration/GaussLegendre.h" -#include "MathLib/TemplateWeightedPoint.h" +#include "MathLib/WeightedPoint.h" namespace NumLib { @@ -29,9 +29,6 @@ template <unsigned N_DIM> class IntegrationGaussLegendreRegular { public: - using WeightedPoint = - typename MathLib::TemplateWeightedPoint<double, double, N_DIM>; - /// Create IntegrationGaussLegendreRegular of the given Gauss-Legendre /// integration order. /// @@ -58,7 +55,7 @@ public: /// /// @param igp The integration point index /// @return a weighted point - WeightedPoint getWeightedPoint(unsigned igp) const + MathLib::WeightedPoint getWeightedPoint(unsigned const igp) const { return getWeightedPoint(getIntegrationOrder(), igp); } @@ -76,7 +73,8 @@ public: /// @param order The number of integration points /// @param igp The integration point index /// @return a weighted point - static WeightedPoint getWeightedPoint(unsigned order, unsigned igp); + static MathLib::WeightedPoint getWeightedPoint(unsigned const order, + unsigned const igp); private: /// Computes weighted point using given integration method. @@ -84,7 +82,7 @@ private: /// \tparam Method Integration method to use. /// \param pos Point indices computed by getPositionIndices. template <typename Method> - static WeightedPoint getWeightedPoint( + static MathLib::WeightedPoint getWeightedPoint( std::array<unsigned, N_DIM> const& pos); private: diff --git a/NumLib/Fem/Integration/IntegrationGaussLegendreTet.h b/NumLib/Fem/Integration/IntegrationGaussLegendreTet.h index 89eb93d38ba7860abc70d10ec6de466921add674..03b54e073a5419ac40e5bbf62651bf40f367042b 100644 --- a/NumLib/Fem/Integration/IntegrationGaussLegendreTet.h +++ b/NumLib/Fem/Integration/IntegrationGaussLegendreTet.h @@ -12,7 +12,7 @@ #include "BaseLib/Error.h" #include "MathLib/Integration/GaussLegendreTet.h" -#include "MathLib/TemplateWeightedPoint.h" +#include "MathLib/WeightedPoint.h" namespace NumLib { @@ -22,8 +22,6 @@ namespace NumLib class IntegrationGaussLegendreTet { public: - using WeightedPoint = MathLib::TemplateWeightedPoint<double, double, 3>; - /** * Construct this object with the given integration order * @@ -53,7 +51,7 @@ public: * @param igp The integration point index * @return a weighted point */ - WeightedPoint getWeightedPoint(unsigned igp) const + MathLib::WeightedPoint getWeightedPoint(unsigned const igp) const { return getWeightedPoint(getIntegrationOrder(), igp); } @@ -65,7 +63,7 @@ public: * @param igp the sampling point id * @return weight */ - static WeightedPoint getWeightedPoint(unsigned order, unsigned igp) + static MathLib::WeightedPoint getWeightedPoint(unsigned const order, unsigned const igp) { switch (order) { @@ -83,9 +81,9 @@ public: } template <typename Method> - static WeightedPoint getWeightedPoint(unsigned igp) + static MathLib::WeightedPoint getWeightedPoint(unsigned const igp) { - return WeightedPoint(Method::X[igp], Method::W[igp]); + return MathLib::WeightedPoint(Method::X[igp], Method::W[igp]); } /** diff --git a/NumLib/Fem/Integration/IntegrationGaussLegendreTri.h b/NumLib/Fem/Integration/IntegrationGaussLegendreTri.h index 16b03c70f938edf2df6556d47b8e8aae84bd66fb..e74fb0dd25e4377d0233e1c082106dea9630ff00 100644 --- a/NumLib/Fem/Integration/IntegrationGaussLegendreTri.h +++ b/NumLib/Fem/Integration/IntegrationGaussLegendreTri.h @@ -16,7 +16,7 @@ #include "BaseLib/Error.h" #include "MathLib/Integration/GaussLegendreTri.h" -#include "MathLib/TemplateWeightedPoint.h" +#include "MathLib/WeightedPoint.h" namespace NumLib { @@ -37,8 +37,6 @@ namespace NumLib class IntegrationGaussLegendreTri { public: - using WeightedPoint = MathLib::TemplateWeightedPoint<double, double, 2>; - /** * Construct this object with the given integration order * @@ -68,7 +66,7 @@ public: * @param igp The integration point index * @return a weighted point */ - WeightedPoint getWeightedPoint(unsigned igp) const + MathLib::WeightedPoint getWeightedPoint(unsigned const igp) const { return getWeightedPoint(getIntegrationOrder(), igp); } @@ -80,7 +78,7 @@ public: * @param igp the sampling point id * @return weight */ - static WeightedPoint getWeightedPoint(unsigned order, unsigned igp) + static MathLib::WeightedPoint getWeightedPoint(unsigned const order, unsigned const igp) { switch (order) { @@ -98,9 +96,9 @@ public: } template <typename Method> - static WeightedPoint getWeightedPoint(unsigned igp) + static MathLib::WeightedPoint getWeightedPoint(unsigned const igp) { - return WeightedPoint(Method::X[igp], 0.5 * Method::W[igp]); + return MathLib::WeightedPoint(Method::X[igp], 0.5 * Method::W[igp]); } /** diff --git a/NumLib/Fem/Integration/IntegrationPoint.h b/NumLib/Fem/Integration/IntegrationPoint.h index 9344f0a28eceed1084b29f107c00f76f83754d2c..f031d9bec3144e0b19b8116ac6adeea7f710921e 100644 --- a/NumLib/Fem/Integration/IntegrationPoint.h +++ b/NumLib/Fem/Integration/IntegrationPoint.h @@ -10,7 +10,7 @@ #pragma once -#include "MathLib/TemplateWeightedPoint.h" +#include "MathLib/WeightedPoint.h" namespace NumLib { @@ -21,8 +21,6 @@ namespace NumLib class IntegrationPoint { public: - using WeightedPoint = MathLib::TemplateWeightedPoint<double, double, 1>; - /// IntegrationPoint constructor for given order. explicit IntegrationPoint(unsigned /* order */) {} @@ -38,7 +36,7 @@ public: // clang-format off /// \copydoc IntegrationGaussLegendreRegular::getWeightedPoint(unsigned) const // clang-format on - static WeightedPoint getWeightedPoint(unsigned igp) + static MathLib::WeightedPoint getWeightedPoint(unsigned const igp) { return getWeightedPoint(getIntegrationOrder(), igp); } @@ -46,17 +44,17 @@ public: // clang-format off /// \copydoc IntegrationGaussLegendreRegular::getWeightedPoint(unsigned, unsigned) // clang-format on - static WeightedPoint getWeightedPoint(unsigned order, unsigned igp) + static MathLib::WeightedPoint getWeightedPoint(unsigned const order, unsigned const igp) { (void)order; (void)igp; - return WeightedPoint({{1}}, 1); + return MathLib::WeightedPoint(1); } template <typename Method> - static WeightedPoint getWeightedPoint(unsigned /*igp*/) + static MathLib::WeightedPoint getWeightedPoint(unsigned /*igp*/) { - return WeightedPoint({{1}}, 1); + return MathLib::WeightedPoint(1); } /// Get the number of integration points.