17 #define MAX_DIRECT_CALCULATION_LEGENDRE 12 22 const std::vector<std::size_t> & order,
29 else if (expansion_type ==
"sqrt_mu")
31 else if (expansion_type ==
"standard")
34 mooseError(
"The specified type of normalization for expansion does not exist");
38 else if (generation_type ==
"sqrt_mu")
40 else if (generation_type ==
"standard")
43 mooseError(
"The specified type of normalization for generation does not exist");
56 if (bounds.size() != 2)
57 mooseError(
"Legend: Invalid number of bounds specified for single series!");
81 case MAX_DIRECT_CALCULATION_LEGENDRE:
82 save(12, ((((((676039 * x2 - 1939938) * x2 + 2078505) * x2 - 1021020) * x2 + 225225) * x2 - 18018) * x2 + 231) / 1024
84 libmesh_fallthrough();
87 save(11, (((((88179 * x2 - 230945) * x2 + 218790) * x2 - 90090) * x2 + 15015) * x2 - 693) *
x / 256
89 libmesh_fallthrough();
92 save(10, (((((46189 * x2 - 109395) * x2 + 90090) * x2 - 30030) * x2 + 3465) * x2 - 63) / 256
94 libmesh_fallthrough();
97 save(9, ((((12155 * x2 - 25740) * x2 + 18018) * x2 - 4620) * x2 + 315) *
x / 128
99 libmesh_fallthrough();
102 save(8, ((((6435 * x2 - 12012) * x2 + 6930) * x2 - 1260) * x2 + 35) / 128
104 libmesh_fallthrough();
107 save(7, (((429 * x2 - 693) * x2 + 315) * x2 - 35) *
x / 16
109 libmesh_fallthrough();
112 save(6, (((231 * x2 - 315) * x2 + 105) * x2 - 5) / 16
114 libmesh_fallthrough();
117 save(5, ((63 * x2 - 70) * x2 + 15) *
x / 8
119 libmesh_fallthrough();
122 save(4, ((35 * x2 - 30) * x2 + 3) / 8
124 libmesh_fallthrough();
127 save(3, (5 * x2 - 3) *
x / 2
129 libmesh_fallthrough();
132 save(2, (3 * x2 - 1) / 2
134 libmesh_fallthrough();
139 libmesh_fallthrough();
169 for (
k = MAX_DIRECT_CALCULATION_LEGENDRE + 1;
k <=
_orders[0]; ++
k)
194 case MAX_DIRECT_CALCULATION_LEGENDRE:
195 save(12, ((((((676039 * x2 - 1939938) * x2 + 2078505) * x2 - 1021020) * x2 + 225225) * x2 - 18018) * x2 + 231) / 1024);
196 libmesh_fallthrough();
199 save(11, (((((88179 * x2 - 230945) * x2 + 218790) * x2 - 90090) * x2 + 15015) * x2 - 693) *
x / 256);
200 libmesh_fallthrough();
203 save(10, (((((46189 * x2 - 109395) * x2 + 90090) * x2 - 30030) * x2 + 3465) * x2 - 63) / 256);
204 libmesh_fallthrough();
207 save(9, ((((12155 * x2 - 25740) * x2 + 18018) * x2 - 4620) * x2 + 315) *
x / 128);
208 libmesh_fallthrough();
211 save(8, ((((6435 * x2 - 12012) * x2 + 6930) * x2 - 1260) * x2 + 35) / 128);
212 libmesh_fallthrough();
215 save(7, (((429 * x2 - 693) * x2 + 315) * x2 - 35) *
x / 16);
216 libmesh_fallthrough();
219 save(6, (((231 * x2 - 315) * x2 + 105) * x2 - 5) / 16);
220 libmesh_fallthrough();
223 save(5, ((63 * x2 - 70) * x2 + 15) *
x / 8);
224 libmesh_fallthrough();
227 save(4, ((35 * x2 - 30) * x2 + 3) / 8);
228 libmesh_fallthrough();
231 save(3, (5 * x2 - 3) *
x / 2);
232 libmesh_fallthrough();
235 save(2, (3 * x2 - 1) / 2);
236 libmesh_fallthrough();
240 libmesh_fallthrough();
254 for (
k = MAX_DIRECT_CALCULATION_LEGENDRE + 1;
k <=
_orders[0]; ++
k)
263 save(i,
load(i) * std::sqrt(i + 0.5));
266 const std::vector<Real> &
270 static const std::vector<Real> standardizedFunctionLimits = {-1, 1};
272 return standardizedFunctionLimits;
288 const Real ratio = difference / span;
291 return {ratio * 2 - 1};
virtual void evaluateSqrtMu()
Evaluates the 1/sqrt(mu) normalized form of the basis functions.
std::vector< Real > _standardized_location
The standardized location of evaluation.
void mooseError(Args &&... args)
virtual Real getStandardizedFunctionVolume() const override
Returns the volume within the standardized function local_limits.
std::function< void()> _evaluateExpansionWrapper
The expansion evaluation wrapper.
std::function< void()> _evaluateGenerationWrapper
The generation evaluation wrapper.
virtual std::vector< Real > getStandardizedLocation(const std::vector< Real > &location) const override
Standardize the location according to the requirements of the underlying basis, which may actually co...
void save(std::size_t index, Real value)
Helper function to store a value in #_series.
std::vector< Real > _physical_bounds
The physical bounds of the series.
virtual void checkPhysicalBounds(const std::vector< Real > &bounds) const override
Checks the physical bounds according to the actual implementation.
const std::vector< double > x
virtual bool isInPhysicalBounds(const Point &point) const override
Determines if the point provided is in within the physical bounds.
virtual std::size_t calculatedNumberOfTermsBasedOnOrder(const std::vector< std::size_t > &order) const override
Returns the number of terms in the single series given a value for the order.
Real load(std::size_t index) const
Helper function to load a value from #_series.
virtual void evaluateOrthonormal()
Evaluates the orthonormal form of the basis functions.
virtual const std::vector< Real > & getStandardizedFunctionLimits() const override
Returns a vector of the lower and upper bounds of the standard functional space.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< Real > extractLocationFromPoint(const Point &point) const
Convert a spatial point to a location that the series will use to determine the value at which to eva...
std::vector< std::size_t > _orders
The order of the series.
virtual void evaluateStandard()
Evaluates the standard form of the basis functions.
std::size_t getNumberOfTerms() const
Returns the number of terms in the series.
This class is a simple wrapper around FunctionalBasisInterface, and intended for use by any single fu...
static const std::string k
MooseEnum generation_type