GRINS-0.6.0
concentric_cylinder_profile.C
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 
26 // This class
28 
29 // libMesh
30 #include "libmesh/point.h"
31 
32 namespace GRINS
33 {
34 
36  : libMesh::FunctionBase<libMesh::Number>(),
37  _u0(2.0),
38  _r0(1.0),
39  _r1(2.0)
40  {
41  return;
42  }
43 
45  const double r0,
46  const double r1 )
47  : libMesh::FunctionBase<libMesh::Number>(),
48  _u0(u0),
49  _r0(r0),
50  _r1(r1)
51  {
52  return;
53  }
54 
56  {
57  return;
58  }
59 
60  libMesh::AutoPtr< libMesh::FunctionBase<libMesh::Number> > ConcentricCylinderProfile::clone() const
61  {
62  return libMesh::AutoPtr< libMesh::FunctionBase<libMesh::Number> >( new ConcentricCylinderProfile( _u0, _r0, _r1 ) );
63  }
64 
65  libMesh::Number ConcentricCylinderProfile::operator()( const libMesh::Point& p,
66  const libMesh::Real )
67  {
68  const double r = p(0);
69 
70  return this->eval( _u0, _r0, _r1, r );
71  }
72 
73  void ConcentricCylinderProfile::operator()( const libMesh::Point& p,
74  const libMesh::Real time,
75  libMesh::DenseVector<libMesh::Number> &output )
76  {
77  for( unsigned int i = 0; i < output.size(); i++ )
78  {
79  output(i) = (*this)(p, time);
80  }
81  return;
82  }
83 
84  libMesh::Number ConcentricCylinderProfile::component( unsigned int /*i*/,
85  const libMesh::Point& p,
86  const libMesh::Real time )
87  {
88  return (*this)(p, time);
89  }
90 
91 } // namespace GRINS
GRINS namespace.
virtual libMesh::Number operator()(const libMesh::Point &p, const libMesh::Real time)
double _u0
Coefficients defining parabola.
virtual libMesh::Number component(unsigned int i, const libMesh::Point &p, const libMesh::Real time)
double eval(const double u0, const double r0, const double r1, const double r)
virtual libMesh::AutoPtr< libMesh::FunctionBase< libMesh::Number > > clone() const

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