GRINS-0.8.0
List of all members | Public Member Functions
GRINS::StabilizationHelper Class Reference

#include <stab_helper.h>

Inheritance diagram for GRINS::StabilizationHelper:
Inheritance graph
[legend]
Collaboration diagram for GRINS::StabilizationHelper:
Collaboration graph
[legend]

Public Member Functions

 StabilizationHelper (const std::string &helper_name)
 
 ~StabilizationHelper ()
 
libMesh::RealGradient compute_g (libMesh::FEBase *fe, AssemblyContext &c, unsigned int qp) const
 
libMesh::RealTensor compute_G (libMesh::FEBase *fe, AssemblyContext &c, unsigned int qp) const
 
- Public Member Functions inherited from GRINS::ParameterUser
 ParameterUser (const std::string &user_name)
 
virtual ~ParameterUser ()
 
virtual void set_parameter (libMesh::Number &param_variable, const GetPot &input, const std::string &param_name, libMesh::Number param_default)
 Each subclass can simultaneously read a parameter value from. More...
 
virtual void set_parameter (libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &func, const GetPot &input, const std::string &func_param_name, const std::string &param_default)
 Each subclass can simultaneously read a parsed function from. More...
 
virtual void set_parameter (libMesh::ParsedFEMFunction< libMesh::Number > &func, const GetPot &input, const std::string &func_param_name, const std::string &param_default)
 Each subclass can simultaneously read a parsed function from. More...
 
virtual void move_parameter (const libMesh::Number &old_parameter, libMesh::Number &new_parameter)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void move_parameter (const libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &old_func, libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &new_func)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void move_parameter (const libMesh::ParsedFEMFunction< libMesh::Number > &old_func, libMesh::ParsedFEMFunction< libMesh::Number > &new_func)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void register_parameter (const std::string &param_name, libMesh::ParameterMultiAccessor< libMesh::Number > &param_pointer) const
 Each subclass will register its copy of an independent. More...
 

Additional Inherited Members

- Static Public Attributes inherited from GRINS::ParameterUser
static std::string zero_vector_function = std::string("{0}")
 A parseable function string with LIBMESH_DIM components, all 0. More...
 

Detailed Description

Definition at line 41 of file stab_helper.h.

Constructor & Destructor Documentation

GRINS::StabilizationHelper::StabilizationHelper ( const std::string &  helper_name)

Definition at line 36 of file stab_helper.C.

36  :
37  ParameterUser(helper_name)
38  {
39  return;
40  }
ParameterUser(const std::string &user_name)
GRINS::StabilizationHelper::~StabilizationHelper ( )

Definition at line 42 of file stab_helper.C.

43  {
44  return;
45  }

Member Function Documentation

libMesh::RealGradient GRINS::StabilizationHelper::compute_g ( libMesh::FEBase *  fe,
AssemblyContext c,
unsigned int  qp 
) const
Todo:
Should we inline this?

Definition at line 47 of file stab_helper.C.

50  {
51  libMesh::RealGradient g( fe->get_dxidx()[qp] );
52 
53  if( c.get_dim() > 1 )
54  {
55  g(0) += fe->get_detadx()[qp];
56  g(1) = fe->get_dxidy()[qp] + fe->get_detady()[qp];
57  }
58 
59  if( c.get_dim() == 3 )
60  {
61  g(0) += fe->get_dzetadx()[qp];
62  g(1) += fe->get_dzetady()[qp];
63  g(2) = fe->get_dxidz()[qp] + fe->get_detadz()[qp] + fe->get_dzetadz()[qp];
64  }
65 
66  return g;
67  }
libMesh::RealTensor GRINS::StabilizationHelper::compute_G ( libMesh::FEBase *  fe,
AssemblyContext c,
unsigned int  qp 
) const
Todo:
Should we inline this?

Definition at line 69 of file stab_helper.C.

72  {
73  libMesh::Real dxidx = fe->get_dxidx()[qp];
74 
75  libMesh::RealTensor G( dxidx*dxidx );
76 
77  if( c.get_dim() > 1 )
78  {
79  libMesh::Real dxidy = fe->get_dxidy()[qp];
80 
81  libMesh::Real detadx = fe->get_detadx()[qp];
82  libMesh::Real detady = fe->get_detady()[qp];
83 
84  G(0,0) += detadx*detadx;
85  G(0,1) = G(1,0) = dxidx*dxidy + detadx*detady;
86  G(1,1) = dxidy*dxidy + detady*detady;
87 
88  if( c.get_dim() == 3 )
89  {
90  libMesh::Real dxidz = fe->get_dxidz()[qp];
91 
92  libMesh::Real detadz = fe->get_detadz()[qp];
93 
94  libMesh::Real dzetadx = fe->get_dzetadx()[qp];
95  libMesh::Real dzetady = fe->get_dzetady()[qp];
96  libMesh::Real dzetadz = fe->get_dzetadz()[qp];
97 
98  G(0,0) += dzetadx*dzetadx;
99  G(0,1) += dzetadx*dzetady;
100  G(0,2) = dxidx*dxidz + detadx*detadz + dzetadx*dzetadz;
101  G(1,0) += dzetady*dzetadx;
102  G(1,1) += dzetady*dzetady;
103  G(1,2) = dxidy*dxidz + detady*detadz + dzetady*dzetadz;
104  G(2,0) = dxidz*dxidx + detadz*detadx + dzetadz*dzetadx;
105  G(2,1) = dxidz*dxidy + detadz*detady + dzetadz*dzetady;
106  G(2,2) = dxidz*dxidz + detadz*detadz + dzetadz*dzetadz;
107  }
108  }
109 
110  return G;
111  }

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

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