GRINS-0.8.0
List of all members | Public Member Functions | Protected Attributes
GRINSTesting::TurbBoundFuncBase Class Referenceabstract
Inheritance diagram for GRINSTesting::TurbBoundFuncBase:
Inheritance graph
[legend]
Collaboration diagram for GRINSTesting::TurbBoundFuncBase:
Collaboration graph
[legend]

Public Member Functions

 TurbBoundFuncBase (libMesh::MeshFunction *turbulent_bc_values)
 
virtual libMesh::Number operator() (const libMesh::Point &, const libMesh::Real=0)
 
virtual libMesh::Number compute_final_value (const libMesh::DenseVector< libMesh::Number > &u_nu_values)=0
 
virtual void operator() (const libMesh::Point &p, const libMesh::Real t, libMesh::DenseVector< libMesh::Number > &output)
 

Protected Attributes

libMesh::MeshFunction * _turbulent_bc_values
 

Detailed Description

Definition at line 68 of file test_turbulent_channel.C.

Constructor & Destructor Documentation

GRINSTesting::TurbBoundFuncBase::TurbBoundFuncBase ( libMesh::MeshFunction *  turbulent_bc_values)
inline

Definition at line 71 of file test_turbulent_channel.C.

72  : _turbulent_bc_values(turbulent_bc_values)
73  { this->_initialized = true; }
libMesh::MeshFunction * _turbulent_bc_values

Member Function Documentation

virtual libMesh::Number GRINSTesting::TurbBoundFuncBase::compute_final_value ( const libMesh::DenseVector< libMesh::Number > &  u_nu_values)
pure virtual
virtual libMesh::Number GRINSTesting::TurbBoundFuncBase::operator() ( const libMesh::Point &  ,
const libMesh::Real  = 0 
)
inlinevirtual

Definition at line 75 of file test_turbulent_channel.C.

76  { libmesh_not_implemented(); }
virtual void GRINSTesting::TurbBoundFuncBase::operator() ( const libMesh::Point &  p,
const libMesh::Real  t,
libMesh::DenseVector< libMesh::Number > &  output 
)
inlinevirtual

Definition at line 80 of file test_turbulent_channel.C.

References _turbulent_bc_values, and compute_final_value().

83  {
84  output.resize(1);
85  output.zero();
86 
87  // Since the turbulent_bc_values object has a solution from a 1-d problem, we have to zero out the y coordinate of p
88  libMesh::Point p_copy(p);
89  // Also, the 1-d solution provided is on the domain [0, 1] on the x axis and we need to map this to the corresponding point on the y axis
90  p_copy(0) = p_copy(1);
91  p_copy(1)= 0.0;
92  // Also, the 1-d solution provided is actually a symmetry solution, so we have to make the following map
93  // x_GRINS < 0.5 => x_meshfunction = 2*x_GRINS , x_GRINS >= 0.5 => x_GRINS = 1 - x_GRINS, x_meshfunction = 2*x_GRINS
94  if(p_copy(0) > 0.5)
95  {
96  p_copy(0) = 1 - p_copy(0);
97  }
98  p_copy(0) = 2*p_copy(0);
99 
100  libMesh::DenseVector<libMesh::Number> u_nu_values;
101  _turbulent_bc_values->operator()(p_copy, t, u_nu_values);
102 
103  output(0) = this->compute_final_value(u_nu_values);
104  }
libMesh::MeshFunction * _turbulent_bc_values
virtual libMesh::Number compute_final_value(const libMesh::DenseVector< libMesh::Number > &u_nu_values)=0

Member Data Documentation

libMesh::MeshFunction* GRINSTesting::TurbBoundFuncBase::_turbulent_bc_values
protected

The documentation for this class was generated from the following file:

Generated on Tue Dec 19 2017 12:47:33 for GRINS-0.8.0 by  doxygen 1.8.9.1