www.mooseframework.org
Public Member Functions | Protected Types | Protected Attributes | List of all members
NSAction Class Reference

This is a base Action class for the Navier-Stokes module which is responsible for building lists of names that other Actions can subsequently use. More...

#include <NSAction.h>

Inheritance diagram for NSAction:
[legend]

Public Member Functions

 NSAction (InputParameters parameters)
 
virtual ~NSAction ()
 
virtual void act ()
 

Protected Types

typedef std::vector< VariableName > CoupledName
 

Protected Attributes

std::vector< std::string > _vars
 
std::vector< std::string > _auxs
 
unsigned int _dim
 

Detailed Description

This is a base Action class for the Navier-Stokes module which is responsible for building lists of names that other Actions can subsequently use.

Subclasses should call its act() function prior to doing their own work.

Definition at line 23 of file NSAction.h.

Member Typedef Documentation

typedef std::vector<VariableName> NSAction::CoupledName
protected

Definition at line 40 of file NSAction.h.

Constructor & Destructor Documentation

NSAction::NSAction ( InputParameters  parameters)

Definition at line 28 of file NSAction.C.

28 : Action(parameters), _dim(0) {}
unsigned int _dim
Definition: NSAction.h:37
NSAction::~NSAction ( )
virtual

Definition at line 30 of file NSAction.C.

30 {}

Member Function Documentation

void NSAction::act ( )
virtual

Reimplemented in AddNavierStokesICsAction, AddNavierStokesVariablesAction, and AddNavierStokesKernelsAction.

Definition at line 33 of file NSAction.C.

Referenced by AddNavierStokesKernelsAction::act(), AddNavierStokesVariablesAction::act(), and AddNavierStokesICsAction::act().

34 {
35  _vars.clear();
36  _auxs.clear();
37 
38  _dim = _mesh->dimension();
39 
40  // Build up the vector of variable names for the user, depending on
41  // the mesh dimension.
42  _vars.push_back(NS::density);
43  _vars.push_back(NS::momentum_x);
44  if (_dim >= 2)
45  _vars.push_back(NS::momentum_y);
46  if (_dim >= 3)
47  _vars.push_back(NS::momentum_z);
48  _vars.push_back(NS::total_energy);
49 
50  // Add Aux variables. These are all required in order for the code
51  // to run, so they should not be independently selectable by the
52  // user.
53  _auxs.push_back(NS::velocity_x);
54  if (_dim >= 2)
55  _auxs.push_back(NS::velocity_y);
56  if (_dim >= 3)
57  _auxs.push_back(NS::velocity_z);
58 
59  _auxs.push_back(NS::pressure);
60  _auxs.push_back(NS::temperature);
61  _auxs.push_back(NS::enthalpy);
62  _auxs.push_back(NS::mach_number);
63 
64  // Needed for FluidProperties calculations
65  _auxs.push_back(NS::internal_energy);
66  _auxs.push_back(NS::specific_volume);
67 }
const std::string momentum_x
Definition: NS.h:16
const std::string mach_number
Definition: NS.h:27
std::vector< std::string > _auxs
Definition: NSAction.h:33
const std::string velocity_z
Definition: NS.h:23
const std::string density
Definition: NS.h:15
const std::string velocity_x
Definition: NS.h:21
const std::string temperature
Definition: NS.h:25
const std::string enthalpy
Definition: NS.h:26
unsigned int _dim
Definition: NSAction.h:37
std::vector< std::string > _vars
Definition: NSAction.h:32
const std::string specific_volume
Definition: NS.h:29
const std::string velocity_y
Definition: NS.h:22
const std::string momentum_y
Definition: NS.h:17
const std::string pressure
Definition: NS.h:24
const std::string total_energy
Definition: NS.h:19
const std::string internal_energy
Definition: NS.h:28
const std::string momentum_z
Definition: NS.h:18

Member Data Documentation

std::vector<std::string> NSAction::_auxs
protected
unsigned int NSAction::_dim
protected
std::vector<std::string> NSAction::_vars
protected

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