GRINS-0.6.0
parabolic_profile.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2015 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef PARABOLIC_PROFILE_H
26 #define PARABOLIC_PROFILE_H
27 
28 // GRINS
29 #include "grins/var_typedefs.h"
30 
31 // libMesh
32 #include "libmesh/function_base.h"
33 
34 namespace GRINS
35 {
36 
38 
42  class ParabolicProfile : public libMesh::FunctionBase<libMesh::Number>
43  {
44  public:
45 
47 
50 
51  ParabolicProfile( const double a, const double b, const double c,
52  const double d, const double e, const double f );
53 
54  virtual ~ParabolicProfile( );
55 
56  virtual libMesh::AutoPtr< libMesh::FunctionBase<libMesh::Number> > clone() const;
57 
58  virtual libMesh::Number operator()( const libMesh::Point &p, const libMesh::Real time );
59 
60  virtual void operator()( const libMesh::Point &p,
61  const libMesh::Real time,
62  libMesh::DenseVector<libMesh::Number> &output );
63 
64  virtual libMesh::Number component( unsigned int i, const libMesh::Point &p,
65  const libMesh::Real time );
66 
67  protected:
68 
69  inline double eval( const double a, const double b, const double c,
70  const double d, const double e, const double f,
71  const double x, const double y )
72  {
73  return a*x*x + b*x*y + c*y*y + d*x + e*y + f;
74  };
75 
77  double _a, _b, _c, _d, _e, _f;
78 
79  }; // class ParabolicProfile
80 
81 } // namespace GRINS
82 
83 #endif // PARABOLIC_PROFILE_H
virtual libMesh::AutoPtr< libMesh::FunctionBase< libMesh::Number > > clone() const
double eval(const double a, const double b, const double c, const double d, const double e, const double f, const double x, const double y)
Parabolic profile.
virtual libMesh::Number operator()(const libMesh::Point &p, const libMesh::Real time)
virtual libMesh::Number component(unsigned int i, const libMesh::Point &p, const libMesh::Real time)
GRINS namespace.
ParabolicProfile()
Default constructor.
double _a
Coefficients defining parabola.

Generated on Mon Jun 22 2015 21:32:19 for GRINS-0.6.0 by  doxygen 1.8.9.1