https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ParameterMeshFunction.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 "ReporterInterface.h"
14
15#include "ParameterMesh.h"
16
21{
22public:
24
26
27 using Function::value;
28 virtual Real value(Real t, const Point & p) const override;
29 virtual RealGradient gradient(Real t, const Point & p) const override;
30 virtual Real timeDerivative(Real t, const Point & p) const override;
31 virtual std::vector<Real> parameterGradient(Real t, const Point & p) const override;
32
33protected:
44 std::array<std::pair<std::size_t, Real>, 2> interpolateTime(Real t,
45 bool derivative = false) const;
46
48 void checkSize() const;
49
53 const std::vector<Real> & _values;
55 const std::vector<Real> & _coordt;
56
57private:
58 const std::vector<Real> _empty_vec = {};
59};
const Real p
virtual Real value(Real t, const Point &p) const
const InputParameters & parameters() 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.
virtual Real timeDerivative(Real t, const Point &p) const override
virtual RealGradient gradient(Real t, const Point &p) const override
virtual Real value(Real t, const Point &p) const override
const ParameterMesh _parameter_mesh
Parameter mesh.
virtual std::vector< Real > parameterGradient(Real t, const Point &p) const override
const std::vector< Real > _empty_vec
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'.
static InputParameters validParams()
const std::vector< Real > & _values
values from reporter
Utility class to use an Exodus mesh to define controllable parameters for optimization problems This ...