MAST
frequency_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__frequency_function_h__
21 #define __mast__frequency_function_h__
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  FrequencyFunction(const std::string& nm,
39  MAST::FieldFunction<Real>& velocity,
41 
42 
43  virtual ~FrequencyFunction();
44 
45 
50  bool if_nondimensional() const {
51 
52  return _if_red_freq;
53  }
54 
55 
60  inline void if_nondimensional(bool v) {
61 
62  _if_red_freq = v;
63  }
64 
65 
69  virtual void operator() (Real& v) const;
70 
71 
76  virtual void derivative (const MAST::FunctionBase& f,
77  Real& v) const;
78 
79 
85 
86 
87 
88  protected:
89 
90 
92 
95  &_velocity,
96  &_b_ref;
97 
98  };
99 }
100 
101 #endif // __mast__frequency_function_h__
MAST::FieldFunction< Real > & _b_ref
virtual void operator()(Real &v) const
calculates the value of the function and returns it in v.
libMesh::Real Real
MAST::FieldFunction< Real > & _velocity
virtual void derivative(const MAST::FunctionBase &f, Real &v) const
calculates the value of the function derivative and returns it in v.
void nondimensionalizing_factor(Real &v)
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.
void if_nondimensional(bool v)
sets the flag for whether or not the frequency has been nondimensionalized: omega b/V ...
MAST::FieldFunction< Real > & _omega
FrequencyFunction(const std::string &nm, MAST::FieldFunction< Real > &omega, MAST::FieldFunction< Real > &velocity, MAST::FieldFunction< Real > &b_ref)