MAST
constant_field_function.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2019 Manav Bhatia
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef __mast__constant_field_function__
21 #define __mast__constant_field_function__
22 
23 // MAST includes
25 
26 
27 namespace MAST {
28 
29  // Forward declerations
30  class Parameter;
31 
33  public MAST::FieldFunction<Real> {
34 
35  public:
36 
37  ConstantFieldFunction(const std::string& nm,
38  const MAST::Parameter& p);
39 
40 
41  virtual ~ConstantFieldFunction();
42 
43 
48  virtual void operator() (Real& v) const;
49 
50 
55  virtual void derivative (const MAST::FunctionBase& f,
56  Real& v) const;
57 
58 
59 
64  virtual void operator() (const libMesh::Point& p,
65  const Real t,
66  Real& v) const;
67 
68 
73  virtual void derivative (const MAST::FunctionBase& f,
74  const libMesh::Point& p,
75  const Real t,
76  Real& v) const;
77 
78 
79 
80  protected:
81 
86 
87  };
88 }
89 
90 
91 #endif // __mast__constant_field_function__
virtual void derivative(const MAST::FunctionBase &f, Real &v) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
This is a scalar function whose value can be changed and one that can be used as a design variable in...
Definition: parameter.h:35
libMesh::Real Real
virtual void operator()(Real &v) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
const MAST::Parameter & _p
parameter which defines this field function
This creates the base class for functions that have a saptial and temporal dependence, and provide sensitivity operations with respect to the functions and parameters.
ConstantFieldFunction(const std::string &nm, const MAST::Parameter &p)