https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ParameterMeshFunction Class Reference

#include <ParameterMeshFunction.h>

Inheritance diagram for ParameterMeshFunction:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 
typedef FunctorBase< Real > FunctorType
 
typedef Real ValueType
 
typedef typename FunctorReturnType< Real, FunctorEvaluationKind::Gradient >::type GradientType
 
typedef ValueType DotType
 

Public Member Functions

 ParameterMeshFunction (const InputParameters &parameters)
 
virtual Real value (Real t, const Point &p) const override
 
virtual RealGradient gradient (Real t, const Point &p) const override
 
virtual Real timeDerivative (Real t, const Point &p) const override
 
virtual std::vector< Real > parameterGradient (Real t, const Point &p) const override
 
virtual Real value (Real t, const Point &p) const
 
virtual ADReal value (const ADReal &t, const ADPoint &p) const
 
ChainedReal value (const ChainedReal &t) const
 
auto value (const U &t) const
 
auto value (const U &t, const U &x, const U &y=0, const U &z=0) const
 
ChainedReal value (const ChainedReal &t) const
 
auto value (const U &t) const
 
auto value (const U &t, const U &x, const U &y=0, const U &z=0) const
 
virtual RealVectorValue vectorValue (Real t, const Point &p) const
 
virtual RealVectorValue curl (Real t, const Point &p) const
 
virtual Real div (Real t, const Point &p) const
 
GradientType gradient (const ElemArg &elem, const StateArg &state) const
 
GradientType gradient (const FaceArg &face, const StateArg &state) const
 
GradientType gradient (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradient (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradient (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradient (const NodeArg &node, const StateArg &state) const
 
GradientType gradient (const ElemArg &elem, const StateArg &state) const
 
GradientType gradient (const FaceArg &face, const StateArg &state) const
 
GradientType gradient (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradient (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradient (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradient (const NodeArg &node, const StateArg &state) const
 
auto timeDerivative (const U &t) const
 
auto timeDerivative (const U &t, const U &x, const U &y=0, const U &z=0) const
 
virtual Real integral () const
 
virtual Real average () const
 
virtual Real timeIntegral (Real t1, Real t2, const Point &p) const
 
void timestepSetup () override
 
void residualSetup () override final
 
void jacobianSetup () override final
 
void customSetup (const ExecFlagType &exec_type) override final
 
bool hasBlocks (SubdomainID) const override
 
bool supportsFaceArg () const override final
 
bool supportsElemSideQpArg () const override final
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
bool isKokkosObject () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
const std::string & name () const
 
std::string typeAndName () const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
MooseObjectName uniqueName () const
 
const InputParametersparameters () const
 
const hit::Node * getHitNode () const
 
bool hasBase () const
 
const std::string & getBase () const
 
const TgetParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const TqueryParam (const std::string &name) const
 
const TgetRenamedParam (const std::string &old_name, const std::string &new_name) const
 
T getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &name) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
std::string messagePrefix (const bool hit_prefix=true) const
 
std::string errorPrefix (const std::string &) const
 
void mooseError (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseDeprecatedNoTrace (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
void callMooseError (std::string msg, const bool with_prefix, const hit::Node *node=nullptr, const bool show_trace=true) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
virtual void initialSetup ()
 
virtual void subdomainSetup ()
 
const ExecFlagEnumgetExecuteOnEnum () const
 
bool isImplicit ()
 
Moose::StateArg determineState () const
 
bool isDefaultPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessor (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessorByName (const PostprocessorName &name) const
 
std::size_t coupledPostprocessors (const std::string &param_name) const
 
const PostprocessorName & getPostprocessorName (const std::string &param_name, const unsigned int index=0) const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const TgetUserObject (const std::string &param_name, bool is_dependency=true) const
 
const TgetUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectBasegetUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const
 
virtual void meshChanged ()
 
const std::vector< MooseVariableScalar * > & getCoupledMooseScalarVars ()
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
FunctorReturnType< Real, FET >::type genericEvaluate (const Space &r, const State &state) const
 
const MooseFunctorName & functorName () const
 
void setCacheClearanceSchedule (const std::set< ExecFlagType > &clearance_schedule)
 
virtual bool isExtrapolatedBoundaryFace (const FaceInfo &, const Elem *, const StateArg &) const
 
virtual bool isExtrapolatedBoundaryFace (const FaceInfo &, const Elem *, const StateArg &) const
 
bool isInternalFace (const FaceInfo &) const
 
virtual bool isConstant () const
 
virtual bool hasFaceSide (const FaceInfo &fi, const bool fi_elem_side) const override
 
void checkFace (const Moose::FaceArg &face) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
ValueType operator() (const ElemArg &elem, const StateArg &state) const
 
ValueType operator() (const FaceArg &face, const StateArg &state) const
 
ValueType operator() (const ElemQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemSideQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemPointArg &elem_point, const StateArg &state) const
 
ValueType operator() (const NodeArg &node, const StateArg &state) const
 
ValueType operator() (const ElemArg &elem, const StateArg &state) const
 
ValueType operator() (const FaceArg &face, const StateArg &state) const
 
ValueType operator() (const ElemQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemSideQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemPointArg &elem_point, const StateArg &state) const
 
ValueType operator() (const NodeArg &node, const StateArg &state) const
 
ValueType operator() (const ElemArg &elem, const StateArg &state) const
 
ValueType operator() (const FaceArg &face, const StateArg &state) const
 
ValueType operator() (const ElemQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemSideQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemPointArg &elem_point, const StateArg &state) const
 
ValueType operator() (const NodeArg &node, const StateArg &state) const
 
DotType dot (const ElemArg &elem, const StateArg &state) const
 
DotType dot (const FaceArg &face, const StateArg &state) const
 
DotType dot (const ElemQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemSideQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemPointArg &elem_point, const StateArg &state) const
 
DotType dot (const NodeArg &node, const StateArg &state) const
 
DotType dot (const ElemArg &elem, const StateArg &state) const
 
DotType dot (const FaceArg &face, const StateArg &state) const
 
DotType dot (const ElemQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemSideQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemPointArg &elem_point, const StateArg &state) const
 
DotType dot (const NodeArg &node, const StateArg &state) const
 
DotType dot (const ElemArg &elem, const StateArg &state) const
 
DotType dot (const FaceArg &face, const StateArg &state) const
 
DotType dot (const ElemQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemSideQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemPointArg &elem_point, const StateArg &state) const
 
DotType dot (const NodeArg &node, const StateArg &state) const
 
GradientType gradDot (const ElemArg &elem, const StateArg &state) const
 
GradientType gradDot (const FaceArg &face, const StateArg &state) const
 
GradientType gradDot (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradDot (const NodeArg &node, const StateArg &state) const
 
GradientType gradDot (const ElemArg &elem, const StateArg &state) const
 
GradientType gradDot (const FaceArg &face, const StateArg &state) const
 
GradientType gradDot (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradDot (const NodeArg &node, const StateArg &state) const
 
GradientType gradDot (const ElemArg &elem, const StateArg &state) const
 
GradientType gradDot (const FaceArg &face, const StateArg &state) const
 
GradientType gradDot (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradDot (const NodeArg &node, const StateArg &state) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 
static void callMooseError (MooseApp *const app, const InputParameters &params, std::string msg, const bool with_prefix, const hit::Node *node, const bool show_trace=true)
 

Public Attributes

 usingCombinedWarningSolutionWarnings
 
const ConsoleStream _console
 

Static Public Attributes

static const std::string type_param
 
static const std::string name_param
 
static const std::string unique_name_param
 
static const std::string app_param
 
static const std::string moose_base_param
 
static const std::string kokkos_object_param
 

Protected Member Functions

std::array< std::pair< std::size_t, Real >, 2 > interpolateTime (Real t, bool derivative=false) const
 This function is used to compute the weights for time interpolation.
 
void checkSize () const
 Used to make sure DoFs in '_parameter_mesh' matches number of values in '_values'.
 
void flagInvalidSolutionInternal (const InvalidSolutionID invalid_solution_id) const
 
InvalidSolutionID registerInvalidSolutionInternal (const std::string &message, const bool warning) const
 
virtual void addPostprocessorDependencyHelper (const PostprocessorName &) const
 
virtual void addUserObjectDependencyHelper (const UserObjectBase &) const
 
TdeclareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< TdeclareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const TgetRestartableData (const std::string &data_name) const
 
TdeclareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
TdeclareRecoverableData (const std::string &data_name, Args &&... args)
 
TdeclareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
TdeclareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
bool isCoupledScalar (const std::string &var_name, unsigned int i=0) const
 
unsigned int coupledScalarComponents (const std::string &var_name) const
 
unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0) const
 
libMesh::Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< is_ad > & coupledGenericScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp) const
 
virtual GradientType evaluateGradDot (const ElemArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const FaceArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemSideQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemPointArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const NodeArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const FaceArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemSideQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemPointArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const NodeArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const FaceArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemSideQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemPointArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const NodeArg &, const StateArg &) const
 
const ReporterContextBasegetReporterContextBaseByName (const ReporterName &reporter_name) const
 
const ReporterNamegetReporterName (const std::string &param_name) const
 
virtual void addReporterDependencyHelper (const ReporterName &)
 
const TgetReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, const std::size_t time_index=0)
 
const TgetReporterValue (const std::string &param_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, const std::size_t time_index=0)
 
const TgetReporterValueByName (const ReporterName &reporter_name, ReporterMode mode, const std::size_t time_index=0)
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValue (const std::string &param_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 
bool hasReporterValueByName (const ReporterName &reporter_name) const
 

Protected Attributes

const ParameterMesh _parameter_mesh
 Parameter mesh.
 
const std::vector< Real > & _values
 values from reporter
 
const std::vector< Real > & _coordt
 Time coordinates from reporter.
 
const bool & _enabled
 
MooseApp_app
 
Factory_factory
 
ActionFactory_action_factory
 
const std::string & _type
 
const std::string & _name
 
const InputParameters_pars
 
const ExecFlagEnum_execute_enum
 
const ExecFlagType_current_execute_flag
 
const InputParameters_ti_params
 
FEProblemBase_ti_feproblem
 
bool _is_implicit
 
Real & _t
 
const Real & _t_old
 
int_t_step
 
Real & _dt
 
Real & _dt_old
 
bool _is_transient
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
FEProblemBase_mci_feproblem
 
FEProblemBase_sc_fe_problem
 
const THREAD_ID _sc_tid
 
const Real & _real_zero
 
const VariableValue_scalar_zero
 
const Point & _point_zero
 
const Parallel::Communicator & _communicator
 

Private Types

typedef Moose::ElemArg ElemArg
 
typedef Moose::ElemQpArg ElemQpArg
 
typedef Moose::ElemSideQpArg ElemSideQpArg
 
typedef Moose::FaceArg FaceArg
 
typedef Moose::ElemPointArg ElemPointArg
 
typedef Moose::NodeArg NodeArg
 

Private Member Functions

ValueType evaluateHelper (const R &r, const Moose::StateArg &state) const
 
ValueType evaluate (const ElemArg &elem, const Moose::StateArg &state) const override final
 
ValueType evaluate (const FaceArg &face, const Moose::StateArg &state) const override final
 
ValueType evaluate (const ElemQpArg &qp, const Moose::StateArg &state) const override final
 
ValueType evaluate (const ElemSideQpArg &elem_side_qp, const Moose::StateArg &state) const override final
 
ValueType evaluate (const ElemPointArg &elem_point, const Moose::StateArg &state) const override final
 
ValueType evaluate (const NodeArg &node, const Moose::StateArg &state) const override final
 
GradientType evaluateGradientHelper (const R &r, const Moose::StateArg &state) const
 
GradientType evaluateGradient (const ElemArg &elem, const Moose::StateArg &state) const override final
 
GradientType evaluateGradient (const FaceArg &face, const Moose::StateArg &state) const override final
 
GradientType evaluateGradient (const ElemQpArg &qp, const Moose::StateArg &state) const override final
 
GradientType evaluateGradient (const ElemSideQpArg &elem_side_qp, const Moose::StateArg &state) const override final
 
GradientType evaluateGradient (const ElemPointArg &elem_point, const Moose::StateArg &state) const override final
 
GradientType evaluateGradient (const NodeArg &node, const Moose::StateArg &state) const override final
 
DotType evaluateDotHelper (const R &r, const Moose::StateArg &state) const
 
DotType evaluateDot (const ElemArg &elem, const Moose::StateArg &state) const override final
 
DotType evaluateDot (const FaceArg &face, const Moose::StateArg &state) const override final
 
DotType evaluateDot (const ElemQpArg &qp, const Moose::StateArg &state) const override final
 
DotType evaluateDot (const ElemSideQpArg &elem_side_qp, const Moose::StateArg &state) const override final
 
DotType evaluateDot (const ElemPointArg &elem_point, const Moose::StateArg &state) const override final
 
DotType evaluateDot (const NodeArg &node, const Moose::StateArg &state) const override final
 
const PostprocessorName & getPostprocessorNameInternal (const std::string &param_name, const unsigned int index, const bool allow_default_value=true) const
 
bool isDefaultPostprocessorValueByName (const PostprocessorName &name) const
 
PostprocessorValue getDefaultPostprocessorValueByName (const PostprocessorName &name) const
 
void checkParam (const std::string &param_name, const unsigned int index=std::numeric_limits< unsigned int >::max()) const
 
bool postprocessorsAdded () const
 
const UserObjectBasegetUserObjectFromFEProblem (const UserObjectName &object_name, const THREAD_ID tid=0) const
 
const TcastUserObject (const UserObjectBase &uo_base, const std::string &param_name="") const
 
void mooseObjectError (const std::string &param_name, std::stringstream &oss) const
 
const std::string & userObjectType (const UserObjectBase &uo) const
 
const std::string & userObjectName (const UserObjectBase &uo) const
 
RestartableDataValueregisterRestartableDataOnApp (std::unique_ptr< RestartableDataValue > data, THREAD_ID tid) const
 
void registerRestartableNameWithFilterOnApp (const std::string &name, Moose::RESTARTABLE_FILTER filter)
 
RestartableData< T > & declareRestartableDataHelper (const std::string &data_name, void *context, Args &&... args) const
 
const VariableValuegetDefaultValue (const std::string &var_name) const
 
const ADVariableValuegetADDefaultValue (const std::string &var_name) const
 
void checkVar (const std::string &var_name) const
 
void validateExecutionerType (const std::string &name, const std::string &fn_name) const
 
void clearCacheData ()
 
ValueType queryQpCache (unsigned int qp, const libMesh::QBase &qrule, std::vector< std::pair< bool, Real > > &qp_cache_data, const SpaceArg &space, const StateArg &state) const
 
ValueType queryFVArgCache (std::map< SpaceArg, ValueType > &cache_data, const SpaceArg &space) const
 
const PostprocessorValuegetPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueInternal (const std::string &param_name, unsigned int index, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const
 
const PostprocessorValuegetPostprocessorValueByNameInternal (const PostprocessorName &name, std::size_t t_index) const
 
bool reportersAdded () const
 
void possiblyCheckHasReporter (const ReporterName &reporter_name, const std::string &param_name="") const
 

Static Private Member Functions

static const hit::Node * getHitNode (const InputParameters &params)
 
static std::string messagePrefix (const InputParameters &params, const bool hit_prefix)
 

Private Attributes

const std::vector< Real > _empty_vec = {}
 
const ParallelParamObject_parent
 
const MooseBase_si_moose_base
 
const FEProblemBase_si_problem
 
ExecFlagEnum _empty_execute_enum
 
const std::string _ti_name
 
const MooseObject_ppi_moose_object
 
const InputParameters_ppi_params
 
const FEProblemBase_ppi_feproblem
 
std::map< PostprocessorName, std::unique_ptr< PostprocessorValue > > _default_values
 
const MooseObject_uoi_moose_object
 
const FEProblemBase_uoi_feproblem
 
const THREAD_ID _uoi_tid
 
const RestartableDataMapName _metaname
 
std::string _restartable_name
 
const InputParameters_sc_parameters
 
const std::string & _sc_name
 
const bool _sc_is_implicit
 
std::unordered_map< std::string, std::vector< MooseVariableScalar * > > _coupled_scalar_vars
 
std::unordered_map< std::string, std::unique_ptr< VariableValue > > _default_value
 
std::unordered_map< std::string, std::unique_ptr< ADVariableValue > > _dual_default_value
 
std::vector< MooseVariableScalar * > _coupled_moose_scalar_vars
 
std::unordered_map< std::string, std::vector< MooseVariableFieldBase * > > _sc_coupled_vars
 
std::set< TagID_sc_coupleable_vector_tags
 
std::set< TagID_sc_coupleable_matrix_tags
 
std::set< ExecFlagType_clearance_schedule
 
bool _always_evaluate
 
dof_id_type _current_qp_map_key
 
std::vector< std::pair< bool, ValueType > > * _current_qp_map_value
 
std::unordered_map< dof_id_type, std::vector< std::pair< bool, ValueType > > > _qp_to_value
 
dof_id_type _current_side_qp_map_key
 
std::vector< std::vector< std::pair< bool, ValueType > > > * _current_side_qp_map_value
 
std::unordered_map< dof_id_type, std::vector< std::vector< std::pair< bool, ValueType > > > > _side_qp_to_value
 
std::map< ElemArg, ValueType_elem_arg_to_value
 
std::map< FaceArg, ValueType_face_arg_to_value
 
std::map< NodeArg, ValueType_node_arg_to_value
 
MooseFunctorName _functor_name
 
const InputParameters_ri_params
 
FEProblemBase_ri_fe_problem_base
 
const ReporterData_ri_reporter_data
 
const MooseObject_ri_moose_object
 

Detailed Description

Definition at line 20 of file ParameterMeshFunction.h.

Constructor & Destructor Documentation

◆ ParameterMeshFunction()

ParameterMeshFunction::ParameterMeshFunction ( const InputParameters parameters)

Definition at line 46 of file ParameterMeshFunction.C.

50 getParam<FileName>("exodus_mesh"),
51 getParam<bool>("project_points"),
52 getParam<unsigned int>("kdtree_candidates")),
53 _values(getReporterValue<std::vector<Real>>("parameter_name")),
54 _coordt(isParamValid("time_name") ? getReporterValue<std::vector<Real>>("time_name")
55 : _empty_vec)
56{
57}
static libMesh::FEType feType(const InputParameters &params)
const InputParameters & parameters() const
bool isParamValid(const std::string &name) const
Base class for functions used in inverse optimization The parameterDerivative function is used in adj...
const std::vector< Real > & _coordt
Time coordinates from reporter.
const ParameterMesh _parameter_mesh
Parameter mesh.
const std::vector< Real > _empty_vec
const std::vector< Real > & _values
values from reporter
const T & getReporterValue(const std::string &param_name, const std::size_t time_index=0)

Member Function Documentation

◆ checkSize()

void ParameterMeshFunction::checkSize ( ) const
protected

Used to make sure DoFs in '_parameter_mesh' matches number of values in '_values'.

Definition at line 184 of file ParameterMeshFunction.C.

185{
187 if (!_coordt.empty())
188 sz *= _coordt.size();
189 if (sz != _values.size())
190 paramError("parameter_name",
191 "Size of parameter vector (",
192 _values.size(),
193 ") does not match number of degrees of freedom in mesh (",
194 sz,
195 ").");
196}
void paramError(const std::string &param, Args... args) const
dof_id_type size() const
uint8_t dof_id_type

Referenced by gradient(), timeDerivative(), and value().

◆ gradient()

RealGradient ParameterMeshFunction::gradient ( Real  t,
const Point &  p 
) const
overridevirtual

Reimplemented from Function.

Definition at line 82 of file ParameterMeshFunction.C.

83{
84 checkSize();
85
86 const auto ti = interpolateTime(t);
87 const dof_id_type offset0 = ti[0].first * _parameter_mesh.size();
88 const dof_id_type offset1 = ti[1].first * _parameter_mesh.size();
89
90 std::vector<dof_id_type> dof_indices;
91 std::vector<RealGradient> weights;
92 _parameter_mesh.getIndexAndWeight(p, dof_indices, weights);
93
94 RealGradient val(0, 0, 0);
95 for (const auto & i : index_range(dof_indices))
96 val += (_values[dof_indices[i] + offset0] * ti[0].second +
97 _values[dof_indices[i] + offset1] * ti[1].second) *
98 weights[i];
99 return val;
100}
const Real p
std::array< std::pair< std::size_t, Real >, 2 > interpolateTime(Real t, bool derivative=false) const
This function is used to compute the weights for time interpolation.
void checkSize() const
Used to make sure DoFs in '_parameter_mesh' matches number of values in '_values'.
void getIndexAndWeight(const Point &pt, std::vector< dof_id_type > &dof_indices, std::vector< Real > &weights) const
Interpolate parameters onto the computational mesh getIndexAndWeight is only used by ParameterMeshFun...
auto index_range(const T &sizable)
RealVectorValue RealGradient

◆ interpolateTime()

std::array< std::pair< std::size_t, Real >, 2 > ParameterMeshFunction::interpolateTime ( Real  t,
bool  derivative = false 
) const
protected

This function is used to compute the weights for time interpolation.

See also
value for an example of how to use the return data
Parameters
tTime to interpolate to
derivateSet to true to compute time derivative
Returns
std::array<std::pair<Real, std::size_t>, 2> Usage: const auto ti = interpolateTime(t); return v[ti[0].first] * ti[0].second + v[ti[1].first] * ti.[1].second;

Definition at line 149 of file ParameterMeshFunction.C.

150{
151 std::array<std::pair<std::size_t, Real>, 2> ti;
152 if (_coordt.size() <= 1 || MooseUtils::absoluteFuzzyLessEqual(t, _coordt[0]))
153 {
154 ti[0] = {0, 0.5};
155 ti[1] = {0, 0.5};
156 }
157 else if (MooseUtils::absoluteFuzzyGreaterEqual(t, _coordt.back()))
158 {
159 ti[0] = {_coordt.size() - 1, 0.5};
160 ti[1] = {_coordt.size() - 1, 0.5};
161 }
162 else
163 for (std::size_t i = 1; i < _coordt.size(); ++i)
164 if (MooseUtils::absoluteFuzzyGreaterEqual(_coordt[i], t))
165 {
166 const Real dt = _coordt[i] - _coordt[i - 1];
167 if (derivative)
168 {
169 ti[0] = {i - 1, -1.0 / dt};
170 ti[1] = {i, 1.0 / dt};
171 }
172 else
173 {
174 ti[0] = {i - 1, (_coordt[i] - t) / dt};
175 ti[1] = {i, (t - _coordt[i - 1]) / dt};
176 }
177 break;
178 }
179
180 return ti;
181}
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Referenced by gradient(), parameterGradient(), timeDerivative(), and value().

◆ parameterGradient()

std::vector< Real > ParameterMeshFunction::parameterGradient ( Real  t,
const Point &  p 
) const
overridevirtual

Implements OptimizationFunction.

Definition at line 126 of file ParameterMeshFunction.C.

127{
128 const auto ti = interpolateTime(t);
129 const dof_id_type offset0 = ti[0].first * _parameter_mesh.size();
130 const dof_id_type offset1 = ti[1].first * _parameter_mesh.size();
131
132 std::vector<dof_id_type> dof_indices;
133 std::vector<Real> weights;
134 _parameter_mesh.getIndexAndWeight(p, dof_indices, weights);
135
137 if (!_coordt.empty())
138 sz *= _coordt.size();
139 std::vector<Real> pg(sz, 0.0);
140 for (const auto & i : index_range(dof_indices))
141 {
142 pg[dof_indices[i] + offset0] += weights[i] * ti[0].second;
143 pg[dof_indices[i] + offset1] += weights[i] * ti[1].second;
144 }
145 return pg;
146}

◆ timeDerivative()

Real ParameterMeshFunction::timeDerivative ( Real  t,
const Point &  p 
) const
overridevirtual

Reimplemented from Function.

Definition at line 103 of file ParameterMeshFunction.C.

104{
105 checkSize();
106
107 const auto ti = interpolateTime(t, true);
108 if (ti[0].first == ti[1].first)
109 return 0.0;
110 const dof_id_type offset0 = ti[0].first * _parameter_mesh.size();
111 const dof_id_type offset1 = ti[1].first * _parameter_mesh.size();
112
113 std::vector<dof_id_type> dof_indices;
114 std::vector<Real> weights;
115 _parameter_mesh.getIndexAndWeight(p, dof_indices, weights);
116
117 Real val = 0;
118 for (const auto & i : index_range(dof_indices))
119 val += (_values[dof_indices[i] + offset0] * ti[0].second +
120 _values[dof_indices[i] + offset1] * ti[1].second) *
121 weights[i];
122 return val;
123}

◆ validParams()

InputParameters ParameterMeshFunction::validParams ( )
static

Definition at line 17 of file ParameterMeshFunction.C.

18{
20 params.addClassDescription("Optimization function with parameters represented by a mesh and "
21 "finite-element shape functions.");
22
23 params.addRequiredParam<FileName>("exodus_mesh", "File containing parameter mesh.");
24 params.addParam<MooseEnum>("family",
26 "Family of FE shape functions for parameter.");
27 params.addParam<MooseEnum>("order",
29 "Order of FE shape functions for parameter.");
30
32 "parameter_name", "Reporter or VectorPostprocessor vector containing parameter values.");
33 params.addParam<ReporterName>("time_name",
34 "Name of vector-postprocessor or reporter vector containing time, "
35 "default assumes time independence.");
36 params.addParam<bool>(
37 "project_points", false, "Whether to find the closest point on parameter mesh.");
38 params.addParam<unsigned int>(
39 "kdtree_candidates",
40 5,
41 "Number of nearest node candidates to consider when projecting points to parameter mesh.");
42
43 return params;
44}
static MooseEnum getNonlinearVariableFamilies()
static MooseEnum getNonlinearVariableOrders()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()

◆ value() [1/9]

virtual ADReal Function::value ( const ADReal t,
const ADPoint p 
) const
virtual

Reimplemented from Function.

◆ value() [2/9]

ChainedReal Function::value ( const ChainedReal t) const

◆ value() [3/9]

ChainedReal Function::value ( const ChainedReal t) const

◆ value() [4/9]

auto Function::value ( const U &  t) const

◆ value() [5/9]

auto Function::value ( const U &  t) const

◆ value() [6/9]

auto Function::value ( const U &  t,
const U &  x,
const U &  y = 0,
const U &  z = 0 
) const

◆ value() [7/9]

auto Function::value ( const U &  t,
const U &  x,
const U &  y = 0,
const U &  z = 0 
) const

◆ value() [8/9]

virtual Real Function::value ( Real  t,
const Point &  p 
) const
virtual

Reimplemented from Function.

◆ value() [9/9]

Real ParameterMeshFunction::value ( Real  t,
const Point &  p 
) const
overridevirtual

Reimplemented from Function.

Definition at line 60 of file ParameterMeshFunction.C.

61{
62 checkSize();
63
64 const auto ti = interpolateTime(t);
65 const dof_id_type offset0 = ti[0].first * _parameter_mesh.size();
66 const dof_id_type offset1 = ti[1].first * _parameter_mesh.size();
67
68 std::vector<dof_id_type> dof_indices;
69 std::vector<Real> weights;
70
71 _parameter_mesh.getIndexAndWeight(p, dof_indices, weights);
72
73 Real val = 0;
74 for (const auto & i : index_range(dof_indices))
75 val += (_values[dof_indices[i] + offset0] * ti[0].second +
76 _values[dof_indices[i] + offset1] * ti[1].second) *
77 weights[i];
78 return val;
79}

Member Data Documentation

◆ _coordt

const std::vector<Real>& ParameterMeshFunction::_coordt
protected

Time coordinates from reporter.

Definition at line 55 of file ParameterMeshFunction.h.

Referenced by checkSize(), interpolateTime(), and parameterGradient().

◆ _empty_vec

const std::vector<Real> ParameterMeshFunction::_empty_vec = {}
private

Definition at line 58 of file ParameterMeshFunction.h.

58{};

◆ _parameter_mesh

const ParameterMesh ParameterMeshFunction::_parameter_mesh
protected

Parameter mesh.

Definition at line 51 of file ParameterMeshFunction.h.

Referenced by checkSize(), gradient(), parameterGradient(), timeDerivative(), and value().

◆ _values

const std::vector<Real>& ParameterMeshFunction::_values
protected

values from reporter

Definition at line 53 of file ParameterMeshFunction.h.

Referenced by checkSize(), gradient(), timeDerivative(), and value().


The documentation for this class was generated from the following files: