www.mooseframework.org
CompositeSeriesBasisInterface.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
12 #include <iomanip>
13 
15 
16 #include "libmesh/point.h"
17 
19 
25 {
26 public:
27  CompositeSeriesBasisInterface(const std::string & who_is_using_me);
28  CompositeSeriesBasisInterface(const std::vector<std::size_t> & orders,
29  std::vector<MooseEnum> series_types,
30  const std::string & who_is_using_me);
32 
33  // Disable move and copy operations
36  void operator=(const CompositeSeriesBasisInterface &) = delete;
38 
39  // Overrides from FunctionalBasisInterface
40  virtual const std::vector<Real> & getStandardizedFunctionLimits() const final;
41  virtual Real getStandardizedFunctionVolume() const final;
42  virtual bool isCacheInvalid() const final;
43  virtual bool isInPhysicalBounds(const Point & point) const final;
44  virtual void setLocation(const Point & p) final;
45  // This definition must be with CSBI because it has to loop over each of the single series.
46  virtual void setOrder(const std::vector<std::size_t> & orders) final;
47 
51  std::vector<Real> combineStandardizedFunctionLimits() const;
52 
56  void setNumberOfTerms();
57 
61  virtual void formatCoefficients(std::ostream & stream,
62  const std::vector<Real> & coefficients) const;
63 
64 protected:
65  // Overrides from FunctionalBasisInterface
66  virtual void evaluateGeneration() final;
67  virtual void evaluateExpansion() final;
68 
73  void evaluateSeries(const std::vector<std::vector<Real>> & single_series_basis_evaluations);
74 
76  std::vector<MooseEnum> _series_types;
77 
79  std::vector<std::unique_ptr<SingleSeriesBasisInterface>> _series;
80 
82  const std::string & _who_is_using_me;
83 
84 private:
87 
88  // Hide from subclasses (everything can be done by CSBI) to prevent BAD things from happening
91 };
92 
CompositeSeriesBasisInterface::_who_is_using_me
const std::string & _who_is_using_me
The name of the MooseObject that is using this class.
Definition: CompositeSeriesBasisInterface.h:82
CompositeSeriesBasisInterface::~CompositeSeriesBasisInterface
virtual ~CompositeSeriesBasisInterface()
Definition: CompositeSeriesBasisInterface.C:301
CompositeSeriesBasisInterface::_previous_point
Point _previous_point
The previous point at which the series was evaluated.
Definition: CompositeSeriesBasisInterface.h:86
CompositeSeriesBasisInterface::setOrder
virtual void setOrder(const std::vector< std::size_t > &orders) final
Set the order of the series.
Definition: CompositeSeriesBasisInterface.C:266
CompositeSeriesBasisInterface::_series_types
std::vector< MooseEnum > _series_types
The series types in this composite series.
Definition: CompositeSeriesBasisInterface.h:76
CompositeSeriesBasisInterface::CompositeSeriesBasisInterface
CompositeSeriesBasisInterface(const std::string &who_is_using_me)
Definition: CompositeSeriesBasisInterface.C:19
CompositeSeriesBasisInterface::getStandardizedFunctionVolume
virtual Real getStandardizedFunctionVolume() const final
Returns the volume within the standardized function local_limits.
Definition: CompositeSeriesBasisInterface.C:124
CompositeSeriesBasisInterface::evaluateGeneration
virtual void evaluateGeneration() final
Evaluate the generation form of the functional basis.
Definition: CompositeSeriesBasisInterface.C:44
CompositeSeriesBasisInterface::isInPhysicalBounds
virtual bool isInPhysicalBounds(const Point &point) const final
Determines if the point provided is in within the physical bounds.
Definition: CompositeSeriesBasisInterface.C:234
CompositeSeriesBasisInterface::isCacheInvalid
virtual bool isCacheInvalid() const final
Whether the cached values correspond to the current point.
Definition: CompositeSeriesBasisInterface.C:220
SingleSeriesBasisInterface
This class is a simple wrapper around FunctionalBasisInterface, and intended for use by any single fu...
Definition: SingleSeriesBasisInterface.h:19
CompositeSeriesBasisInterface
This class is the basis for constructing a composite—or convolved—functional series by combining mult...
Definition: CompositeSeriesBasisInterface.h:24
FunctionalBasisInterface.h
CompositeSeriesBasisInterface::evaluateExpansion
virtual void evaluateExpansion() final
Evaluate the expansion form of the functional basis.
Definition: CompositeSeriesBasisInterface.C:101
CompositeSeriesBasisInterface::setLocation
virtual void setLocation(const Point &p) final
Set the location that will be used by the series to compute values.
Definition: CompositeSeriesBasisInterface.C:287
FunctionalBasisInterface::clearBasisEvaluation
virtual void clearBasisEvaluation(const unsigned int &number_of_terms)
Set all entries of the basis evaluation to zero.
Definition: FunctionalBasisInterface.C:144
CompositeSeriesBasisInterface::setNumberOfTerms
void setNumberOfTerms()
Initialize the number of terms in the composite series by looping over the single series.
Definition: CompositeSeriesBasisInterface.C:248
CompositeSeriesBasisInterface::operator=
void operator=(const CompositeSeriesBasisInterface &)=delete
CompositeSeriesBasisInterface::combineStandardizedFunctionLimits
std::vector< Real > combineStandardizedFunctionLimits() const
Get the function limits by looping over each of the single series.
Definition: CompositeSeriesBasisInterface.C:135
FunctionalBasisInterface::_is_cache_invalid
bool _is_cache_invalid
indicates if the evaluated values correspond to the current location
Definition: FunctionalBasisInterface.h:147
CompositeSeriesBasisInterface::_series
std::vector< std::unique_ptr< SingleSeriesBasisInterface > > _series
A pointer to the single series type (one for each entry in _domains)
Definition: CompositeSeriesBasisInterface.h:79
CompositeSeriesBasisInterface::evaluateSeries
void evaluateSeries(const std::vector< std::vector< Real >> &single_series_basis_evaluations)
Evaluates the values of _basis_evaluation for either evaluateGeneration() or evaluateExpansion()
Definition: CompositeSeriesBasisInterface.C:59
CompositeSeriesBasisInterface::formatCoefficients
virtual void formatCoefficients(std::ostream &stream, const std::vector< Real > &coefficients) const
Appends a tabulated form of the coefficients to the stream.
Definition: CompositeSeriesBasisInterface.C:150
CompositeSeriesBasisInterface::getStandardizedFunctionLimits
virtual const std::vector< Real > & getStandardizedFunctionLimits() const final
Returns a vector of the lower and upper bounds of the standard functional space.
Definition: CompositeSeriesBasisInterface.C:116
FunctionalBasisInterface
This class provides the basis for any custom functional basis, and is the parent class of both Single...
Definition: FunctionalBasisInterface.h:23