https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SingleSeriesBasisInterface.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
13#include <functional>
14
20{
21public:
23 SingleSeriesBasisInterface(const std::vector<MooseEnum> & domains,
24 const std::vector<std::size_t> & orders,
25 const unsigned int number_of_terms);
27
28 // Disable move and copy operations
31 void operator=(const SingleSeriesBasisInterface &) = delete;
33
34 // Overrides from FunctionalBasisInterface
35 virtual bool isCacheInvalid() const final;
36 virtual void setLocation(const Point & point) final;
37 virtual void setOrder(const std::vector<std::size_t> & orders) final;
38 virtual void setPhysicalBounds(const std::vector<Real> & bounds) final;
39
43 virtual std::size_t
44 calculatedNumberOfTermsBasedOnOrder(const std::vector<std::size_t> & order) const = 0;
45
51 virtual std::vector<Real> getStandardizedLocation(const std::vector<Real> & location) const = 0;
52
56 std::size_t getOrder(std::size_t domain) const;
57
60 const std::vector<MooseEnum> _domains;
61
62protected:
63 // Overrides from FunctionalBasisInterface
64 virtual void evaluateGeneration() override;
65 virtual void evaluateExpansion() override;
66
70 virtual void checkPhysicalBounds(const std::vector<Real> & bounds) const = 0;
71
76 std::vector<Real> extractLocationFromPoint(const Point & point) const;
77
79 std::vector<std::size_t> _orders;
80
82 std::vector<Real> _physical_bounds;
83
86
88 std::function<void()> _evaluateExpansionWrapper;
89
92
93private:
96
99 std::vector<Real> _location;
100
101 // Hide from subclasses to prevent BAD things from happening
104};
This class provides the basis for any custom functional basis, and is the parent class of both Single...
This class is a simple wrapper around FunctionalBasisInterface, and intended for use by any single fu...
bool _is_cache_invalid
indicates if the evaluated values correspond to the current location
SingleSeriesBasisInterface & operator=(SingleSeriesBasisInterface &&)=delete
virtual void setPhysicalBounds(const std::vector< Real > &bounds) final
Sets the bounds of the series.
virtual void checkPhysicalBounds(const std::vector< Real > &bounds) const =0
Checks the physical bounds according to the actual implementation.
virtual void setLocation(const Point &point) final
Set the location that will be used by the series to compute values.
virtual std::vector< Real > getStandardizedLocation(const std::vector< Real > &location) const =0
Standardize the location according to the requirements of the underlying basis, which may actually co...
std::vector< Real > _physical_bounds
The physical bounds of the series.
std::size_t getOrder(std::size_t domain) const
Returns the order of the particular domain index.
virtual void evaluateGeneration() override
Evaluate the generation form of the functional basis.
const std::vector< MooseEnum > _domains
An ordered list of the x, y, and/or z domains needed by the functional basis to convert a point to a ...
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...
SingleSeriesBasisInterface(const SingleSeriesBasisInterface &)=delete
std::vector< std::size_t > _orders
The order of the series.
std::function< void()> _evaluateGenerationWrapper
The generation evaluation wrapper.
std::vector< Real > _standardized_location
The standardized location of evaluation.
void operator=(const SingleSeriesBasisInterface &)=delete
virtual void setOrder(const std::vector< std::size_t > &orders) final
Set the order of the series.
virtual bool isCacheInvalid() const final
Whether the cached values correspond to the current point.
virtual std::size_t calculatedNumberOfTermsBasedOnOrder(const std::vector< std::size_t > &order) const =0
Returns the number of terms in the single series given a value for the order.
virtual void clearBasisEvaluation(const unsigned int &number_of_terms)
Set all entries of the basis evaluation to zero.
std::function< void()> _evaluateExpansionWrapper
The expansion evaluation wrapper.
bool _are_physical_bounds_specified
Flag for if the physical bounds are specified for this series.
std::vector< Real > _location
The domain locations of the current evaluation.
SingleSeriesBasisInterface(SingleSeriesBasisInterface &&)=delete
virtual void evaluateExpansion() override
Evaluate the expansion form of the functional basis.