https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FunctionSeries.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
14
21{
22public:
24
26
30 static FunctionSeries & checkAndConvertFunction(const Function & function,
31 const std::string & typeName,
32 const std::string & objectName);
33
34 // Override from MemoizedFunctionInterface
35 virtual Real evaluateValue(Real t, const Point & p) override;
36
40 Real expand();
41
45 Real expand(const std::vector<Real> & coefficients);
46
50 std::size_t getNumberOfTerms() const;
51
56
60 const std::vector<std::size_t> & getOrders() const;
61
65 const std::vector<Real> & getGeneration();
66
70 const std::vector<Real> & getExpansion();
71
75 bool isInPhysicalBounds(const Point & point) const;
76
80 void setLocation(const Point & point);
81
85 friend std::ostream & operator<<(std::ostream & stream, const FunctionSeries & me);
86
87protected:
89 const std::vector<std::size_t> _orders;
90
92 const std::vector<Real> _physical_bounds;
93
95 std::unique_ptr<CompositeSeriesBasisInterface> _series_type;
96
99
100 /*
101 * Enumerations of the possible series types for the different spatial expansions. Not all of
102 * these will be provided for any one series.
103 */
105 const MooseEnum & _x;
107 const MooseEnum & _y;
109 const MooseEnum & _z;
116
117private:
123 static std::vector<std::size_t> convertOrders(const std::vector<unsigned int> & orders);
124};
const Real p
This class uses implementations of CompositeSeriesBasisInterface to generate a function based on conv...
const std::vector< std::size_t > _orders
The vector holding the orders of each single series.
static InputParameters validParams()
std::size_t getNumberOfTerms() const
Returns the number of terms (coefficients) in the underlying function series.
const MooseEnum & _disc
Stores the name of the single function series to use for a unit disc.
static std::vector< std::size_t > convertOrders(const std::vector< unsigned int > &orders)
Static function to convert an array of unsigned int to std::size_t.
const MooseEnum & _z
Stores the name of the single function series to use in the z direction.
void setLocation(const Point &point)
Set the current evaluation location.
const MooseEnum & _y
Stores the name of the single function series to use in the y direction.
virtual Real evaluateValue(Real t, const Point &p) override
Used in derived classes, equivalent to Function::value()
bool isInPhysicalBounds(const Point &point) const
Returns true if the provided point is within the set physical boundaries.
const std::vector< Real > & getExpansion()
Returns a vector of the expansion-evaluated functional series at the current location.
const std::vector< std::size_t > & getOrders() const
Returns a vector of the functional orders in the underlying functional series.
const MooseEnum & _generation_type
The normalization type for generation.
friend std::ostream & operator<<(std::ostream &stream, const FunctionSeries &me)
Returns a tabularized text stream of the currently stored coefficients.
const MooseEnum & _expansion_type
The normalization type for expansion.
const MooseEnum & _x
Stores the name of the single function series to use in the x direction.
static FunctionSeries & checkAndConvertFunction(const Function &function, const std::string &typeName, const std::string &objectName)
Static function to cast a Function to SeriesFunction.
const std::vector< Real > & getGeneration()
Returns a vector of the generation-evaluated functional series at the current location.
Real expand()
Expand the function series at the current location and with the current coefficients.
const std::vector< Real > _physical_bounds
The physical bounds of the function series.
Real getStandardizedFunctionVolume() const
Returns the volume of evaluation in the functional series standardized space.
const MooseEnum & _series_type_name
Stores the name of the current functional series type.
std::unique_ptr< CompositeSeriesBasisInterface > _series_type
Stores a pointer to the functional series object.
const InputParameters & parameters() const
Interface for a type of functions using coefficients that may be changed before or after a solve.