GRINS-0.8.0
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
GRINS::Physics Class Reference

Physics abstract base class. Defines API for physics to be added to MultiphysicsSystem. More...

#include <physics.h>

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

Public Member Functions

 Physics (const GRINS::PhysicsName &physics_name, const GetPot &input)
 
virtual ~Physics ()
 
virtual void init_variables (libMesh::FEMSystem *)
 Initialize variables for this physics. More...
 
virtual bool enabled_on_elem (const libMesh::Elem *elem)
 Find if current physics is active on supplied element. More...
 
void set_is_steady (bool is_steady)
 Sets whether this physics is to be solved with a steady solver or not. More...
 
bool is_steady () const
 Returns whether or not this physics is being solved with a steady solver. More...
 
virtual void set_time_evolving_vars (libMesh::FEMSystem *system)
 Set which variables are time evolving. More...
 
virtual void auxiliary_init (MultiphysicsSystem &system)
 Any auxillary initialization a Physics class may need. More...
 
virtual void register_postprocessing_vars (const GetPot &input, PostProcessedQuantities< libMesh::Real > &postprocessing)
 Register name of postprocessed quantity with PostProcessedQuantities. More...
 
virtual void init_context (AssemblyContext &context)
 Initialize context for added physics variables. More...
 
virtual void preassembly (MultiphysicsSystem &)
 Perform any necessary setup before element assembly begins. More...
 
virtual void reinit (MultiphysicsSystem &)
 Any reinitialization that needs to be done. More...
 
virtual void element_time_derivative (bool, AssemblyContext &)
 Time dependent part(s) of physics for element interiors. More...
 
virtual void side_time_derivative (bool, AssemblyContext &)
 Time dependent part(s) of physics for boundaries of elements on the domain boundary. More...
 
virtual void nonlocal_time_derivative (bool, AssemblyContext &)
 Time dependent part(s) of physics for scalar variables. More...
 
virtual void element_constraint (bool, AssemblyContext &)
 Constraint part(s) of physics for element interiors. More...
 
virtual void side_constraint (bool, AssemblyContext &)
 Constraint part(s) of physics for boundaries of elements on the domain boundary. More...
 
virtual void nonlocal_constraint (bool, AssemblyContext &)
 Constraint part(s) of physics for scalar variables. More...
 
virtual void damping_residual (bool, AssemblyContext &)
 Damping matrix part(s) for element interiors. All boundary terms lie within the time_derivative part. More...
 
virtual void mass_residual (bool, AssemblyContext &)
 Mass matrix part(s) for element interiors. All boundary terms lie within the time_derivative part. More...
 
virtual void nonlocal_mass_residual (bool, AssemblyContext &)
 Mass matrix part(s) for scalar variables. More...
 
void init_ics (libMesh::FEMSystem *system, libMesh::CompositeFunction< libMesh::Number > &all_ics)
 
virtual void compute_element_time_derivative_cache (AssemblyContext &)
 
virtual void compute_side_time_derivative_cache (AssemblyContext &)
 
virtual void compute_nonlocal_time_derivative_cache (AssemblyContext &)
 
virtual void compute_element_constraint_cache (AssemblyContext &)
 
virtual void compute_side_constraint_cache (AssemblyContext &)
 
virtual void compute_nonlocal_constraint_cache (AssemblyContext &)
 
virtual void compute_damping_residual_cache (AssemblyContext &)
 
virtual void compute_mass_residual_cache (AssemblyContext &)
 
virtual void compute_nonlocal_mass_residual_cache (AssemblyContext &)
 
virtual void compute_postprocessed_quantity (unsigned int quantity_index, const AssemblyContext &context, const libMesh::Point &point, libMesh::Real &value)
 
ICHandlingBaseget_ic_handler ()
 
- 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...
 

Static Public Member Functions

static void set_is_axisymmetric (bool is_axisymmetric)
 Set whether we should treat the problem as axisymmetric. More...
 
static bool is_axisymmetric ()
 

Protected Member Functions

libMesh::UniquePtr< libMesh::FEGenericBase< libMesh::Real > > build_new_fe (const libMesh::Elem *elem, const libMesh::FEGenericBase< libMesh::Real > *fe, const libMesh::Point p)
 
void parse_enabled_subdomains (const GetPot &input, const std::string &physics_name)
 
void check_var_subdomain_consistency (const FEVariablesBase &var) const
 Check that var is enabled on at least the subdomains this Physics is. More...
 

Protected Attributes

const PhysicsName _physics_name
 Name of the physics object. Used for reading physics specific inputs. More...
 
GRINS::ICHandlingBase_ic_handler
 
std::set< libMesh::subdomain_id_type > _enabled_subdomains
 Subdomains on which the current Physics class is enabled. More...
 

Static Protected Attributes

static bool _is_steady = false
 Caches whether or not the solver that's being used is steady or not. More...
 
static bool _is_axisymmetric = false
 Caches whether we are solving an axisymmetric problem or not. More...
 

Private Member Functions

 Physics ()
 

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

Physics abstract base class. Defines API for physics to be added to MultiphysicsSystem.

This abstract base class defines the API for use within the MultiphysicsSystem. Each physics instantiation must initialize its varaibles (and element orders and types), initialize the DiffContext for the added variables, and provide element and boundary routines for assembly (to be called by MultiphysicsSystem).

MultiphysicsSystem (through FEMSystem) solves the following equation:

$M(u)\dot{u} = F(u)$

M = mass matrix u = solution vector F = time derivative

Note that for the nonlinear system that is solved for implicit time stepping is:

$M(u_{\theta})(u^n - u^{n+1}) + \Delta t F(u) = 0$

Definition at line 106 of file physics.h.

Constructor & Destructor Documentation

GRINS::Physics::Physics ( const GRINS::PhysicsName physics_name,
const GetPot &  input 
)

Definition at line 44 of file physics.C.

References parse_enabled_subdomains(), and set_is_axisymmetric().

46  : ParameterUser(physics_name),
47  _physics_name( physics_name ),
48  _ic_handler(new ICHandlingBase(physics_name))
49  {
50  this->parse_enabled_subdomains(input,physics_name);
51 
52  // Check if this is an axisymmetric problem
53  // There will be redundant calls for multiple Physics objects,
54  // but this guarantees we've parsed is_axisymmetric and then
55  // we can check in subclasses and error out if the Physics
56  // doesn't support axisymmetry.
57  Physics::set_is_axisymmetric( input("Physics/is_axisymmetric",false) );
58  }
GRINS::ICHandlingBase * _ic_handler
Definition: physics.h:258
ParameterUser(const std::string &user_name)
const PhysicsName _physics_name
Name of the physics object. Used for reading physics specific inputs.
Definition: physics.h:256
static void set_is_axisymmetric(bool is_axisymmetric)
Set whether we should treat the problem as axisymmetric.
Definition: physics.h:129
void parse_enabled_subdomains(const GetPot &input, const std::string &physics_name)
Definition: physics.C:65
GRINS::Physics::~Physics ( )
virtual

Definition at line 60 of file physics.C.

References _ic_handler.

61  {
62  if( _ic_handler ) delete _ic_handler;
63  }
GRINS::ICHandlingBase * _ic_handler
Definition: physics.h:258
GRINS::Physics::Physics ( )
private

Member Function Documentation

void GRINS::Physics::auxiliary_init ( MultiphysicsSystem system)
virtual

Any auxillary initialization a Physics class may need.

This is called after all variables are added, so this method can safely query the MultiphysicsSystem about variable information.

Reimplemented in GRINS::IncompressibleNavierStokes< Viscosity >, GRINS::Stokes< Viscosity >, GRINS::LowMachNavierStokes< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::VariablePinning, and GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >.

Definition at line 107 of file physics.C.

108  {
109  return;
110  }
libMesh::UniquePtr< libMesh::FEGenericBase< libMesh::Real > > GRINS::Physics::build_new_fe ( const libMesh::Elem *  elem,
const libMesh::FEGenericBase< libMesh::Real > *  fe,
const libMesh::Point  p 
)
protected
Todo:
This is straight up copied from libMesh. Need to make this available from libMesh.

Definition at line 143 of file physics.C.

146  {
147  using namespace libMesh;
148  FEType fe_type = fe->get_fe_type();
149 
150  // If we don't have an Elem to evaluate on, then the only functions
151  // we can sensibly evaluate are the scalar dofs which are the same
152  // everywhere.
153  libmesh_assert(elem || fe_type.family == SCALAR);
154 
155  unsigned int elem_dim = elem ? elem->dim() : 0;
156 
157  UniquePtr<FEGenericBase<libMesh::Real> >
158  fe_new(FEGenericBase<libMesh::Real>::build(elem_dim, fe_type));
159 
160  // Map the physical co-ordinates to the master co-ordinates using the inverse_map from fe_interface.h
161  // Build a vector of point co-ordinates to send to reinit
162  Point master_point = elem ?
163  FEInterface::inverse_map(elem_dim, fe_type, elem, p) :
164  Point(0);
165 
166  std::vector<Point> coor(1, master_point);
167 
168  // Reinitialize the element and compute the shape function values at coor
169  fe_new->reinit (elem, &coor);
170 
171  return fe_new;
172  }
void GRINS::Physics::check_var_subdomain_consistency ( const FEVariablesBase var) const
protected

Check that var is enabled on at least the subdomains this Physics is.

Definition at line 174 of file physics.C.

References _enabled_subdomains, and GRINS::FEVariablesBase::subdomain_ids().

Referenced by GRINS::BoussinesqBuoyancyBase::BoussinesqBuoyancyBase(), GRINS::ConvectionDiffusion::ConvectionDiffusion(), GRINS::HeatConduction< Conductivity >::HeatConduction(), GRINS::HeatTransferBase< Conductivity >::HeatTransferBase(), GRINS::IncompressibleNavierStokesBase< Viscosity >::IncompressibleNavierStokesBase(), GRINS::LowMachNavierStokesBase< Viscosity, SpecificHeat, ThermalConductivity >::LowMachNavierStokesBase(), GRINS::ReactingLowMachNavierStokesAbstract::ReactingLowMachNavierStokesAbstract(), GRINS::SolidMechanicsAbstract::SolidMechanicsAbstract(), and GRINS::SpalartAllmaras< Viscosity >::SpalartAllmaras().

175  {
176  const std::set<libMesh::subdomain_id_type>& var_subdomains = var.subdomain_ids();
177 
178  // If both are empty or only the var is empty, we don't need to do anything
179  // since the check is automatically satisified. Empty in both cases means
180  // enabled on all subdomains
181 
182  if( _enabled_subdomains.empty() && !var_subdomains.empty() )
183  libmesh_error_msg("ERROR: Physics enabled on all subdomains but variable is not!");
184 
185  if( !_enabled_subdomains.empty() && !var_subdomains.empty() )
186  for( std::set<libMesh::subdomain_id_type>::const_iterator it = _enabled_subdomains.begin(); it != _enabled_subdomains.end(); ++it )
187  if( var_subdomains.find(*it) == var_subdomains.end() )
188  libmesh_error_msg("ERROR: Could not find subdomain " << *it << " in varaible!");
189  }
std::set< libMesh::subdomain_id_type > _enabled_subdomains
Subdomains on which the current Physics class is enabled.
Definition: physics.h:261
virtual void GRINS::Physics::compute_damping_residual_cache ( AssemblyContext )
inlinevirtual

Definition at line 224 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::damping_residual().

224 {}
virtual void GRINS::Physics::compute_element_constraint_cache ( AssemblyContext )
inlinevirtual

Definition at line 218 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::element_constraint().

218 {}
virtual void GRINS::Physics::compute_element_time_derivative_cache ( AssemblyContext )
inlinevirtual
virtual void GRINS::Physics::compute_mass_residual_cache ( AssemblyContext )
inlinevirtual

Definition at line 226 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::mass_residual().

226 {}
virtual void GRINS::Physics::compute_nonlocal_constraint_cache ( AssemblyContext )
inlinevirtual

Definition at line 222 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::nonlocal_constraint().

222 {}
virtual void GRINS::Physics::compute_nonlocal_mass_residual_cache ( AssemblyContext )
inlinevirtual

Definition at line 228 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::nonlocal_mass_residual().

228 {}
virtual void GRINS::Physics::compute_nonlocal_time_derivative_cache ( AssemblyContext )
inlinevirtual

Definition at line 216 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::nonlocal_time_derivative().

216 {}
void GRINS::Physics::compute_postprocessed_quantity ( unsigned int  quantity_index,
const AssemblyContext context,
const libMesh::Point &  point,
libMesh::Real &  value 
)
virtual
virtual void GRINS::Physics::compute_side_constraint_cache ( AssemblyContext )
inlinevirtual

Definition at line 220 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::side_constraint().

220 {}
virtual void GRINS::Physics::compute_side_time_derivative_cache ( AssemblyContext )
inlinevirtual

Definition at line 214 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::side_time_derivative().

214 {}
virtual void GRINS::Physics::damping_residual ( bool  ,
AssemblyContext  
)
inlinevirtual

Damping matrix part(s) for element interiors. All boundary terms lie within the time_derivative part.

Reimplemented in GRINS::ElasticCableRayleighDamping< StressStrainLaw >, and GRINS::ElasticMembraneRayleighDamping< StressStrainLaw >.

Definition at line 198 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::damping_residual().

199  {}
virtual void GRINS::Physics::element_constraint ( bool  ,
AssemblyContext  
)
inlinevirtual
virtual void GRINS::Physics::element_time_derivative ( bool  ,
AssemblyContext  
)
inlinevirtual

Time dependent part(s) of physics for element interiors.

Reimplemented in GRINS::SpalartAllmaras< Viscosity >, GRINS::AxisymmetricBoussinesqBuoyancy, GRINS::AveragedFan< Viscosity >, GRINS::ParsedVelocitySource< Viscosity >, GRINS::VelocityPenalty< Viscosity >, GRINS::AveragedTurbine< Viscosity >, GRINS::AxisymmetricHeatTransfer< Conductivity >, GRINS::VelocityDrag< Viscosity >, GRINS::IncompressibleNavierStokes< Viscosity >, GRINS::BoussinesqBuoyancy, GRINS::AveragedTurbineAdjointStabilization< Viscosity >, GRINS::LowMachNavierStokes< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::VelocityDragAdjointStabilization< Viscosity >, GRINS::AveragedFanAdjointStabilization< Viscosity >, GRINS::Stokes< Viscosity >, GRINS::HeatTransfer< Conductivity >, GRINS::BoussinesqBuoyancySPGSMStabilization< Viscosity >, GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >, GRINS::ConvectionDiffusion, GRINS::HeatConduction< Conductivity >, GRINS::BoussinesqBuoyancyAdjointStabilization< Viscosity >, GRINS::ParsedVelocitySourceAdjointStabilization< Viscosity >, GRINS::VelocityPenaltyAdjointStabilization< Viscosity >, GRINS::ElasticCable< StressStrainLaw >, GRINS::ElasticMembrane< StressStrainLaw >, GRINS::ParsedSourceTerm, GRINS::SpalartAllmarasSPGSMStabilization< Viscosity >, GRINS::HeatTransferAdjointStabilization< Conductivity >, GRINS::HeatTransferSPGSMStabilization< Conductivity >, GRINS::LowMachNavierStokesBraackStabilization< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::LowMachNavierStokesVMSStabilization< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::ConstantSourceTerm, GRINS::ElasticMembraneConstantPressure, GRINS::IncompressibleNavierStokesAdjointStabilization< Viscosity >, GRINS::IncompressibleNavierStokesSPGSMStabilization< Viscosity >, GRINS::LowMachNavierStokesSPGSMStabilization< Viscosity, SpecificHeat, ThermalConductivity >, and GRINS::ReactingLowMachNavierStokesSPGSMStabilization< Mixture, Evaluator >.

Definition at line 174 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::element_time_derivative().

175  {}
bool GRINS::Physics::enabled_on_elem ( const libMesh::Elem *  elem)
virtual

Find if current physics is active on supplied element.

Definition at line 77 of file physics.C.

References _enabled_subdomains.

78  {
79  // Check if enabled_subdomains flag has been set and if we're
80  // looking at a real element (rather than a nonlocal evaluation)
81  if( !elem || _enabled_subdomains.empty() )
82  return true;
83 
84  // Check if current physics is enabled on elem
85  if( _enabled_subdomains.find( elem->subdomain_id() ) == _enabled_subdomains.end() )
86  return false;
87 
88  return true;
89  }
std::set< libMesh::subdomain_id_type > _enabled_subdomains
Subdomains on which the current Physics class is enabled.
Definition: physics.h:261
ICHandlingBase * GRINS::Physics::get_ic_handler ( )
inline

Definition at line 278 of file physics.h.

References _ic_handler.

279  {
280  return _ic_handler;
281  }
GRINS::ICHandlingBase * _ic_handler
Definition: physics.h:258
void GRINS::Physics::init_context ( AssemblyContext context)
virtual

Initialize context for added physics variables.

Reimplemented in GRINS::SpalartAllmaras< Viscosity >, GRINS::AxisymmetricBoussinesqBuoyancy, GRINS::AveragedFan< Viscosity >, GRINS::ScalarODE, GRINS::LowMachNavierStokesBase< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::AveragedTurbine< Viscosity >, GRINS::AxisymmetricHeatTransfer< Conductivity >, GRINS::VelocityDrag< Viscosity >, GRINS::IncompressibleNavierStokesBase< Viscosity >, GRINS::ParsedVelocitySource< Viscosity >, GRINS::VelocityPenalty< Viscosity >, GRINS::AveragedTurbineAdjointStabilization< Viscosity >, GRINS::VelocityDragAdjointStabilization< Viscosity >, GRINS::AveragedFanAdjointStabilization< Viscosity >, GRINS::HeatTransferBase< Conductivity >, GRINS::LowMachNavierStokes< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::ReactingLowMachNavierStokesAbstract, GRINS::ConvectionDiffusion, GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >, GRINS::BoussinesqBuoyancyAdjointStabilization< Viscosity >, GRINS::ParsedVelocitySourceAdjointStabilization< Viscosity >, GRINS::VelocityPenaltyAdjointStabilization< Viscosity >, GRINS::ReactingLowMachNavierStokesStabilizationBase< Mixture, Evaluator >, GRINS::HeatConduction< Conductivity >, GRINS::LowMachNavierStokesStabilizationBase< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::ElasticCableAbstract, GRINS::ElasticMembraneAbstract, GRINS::HeatTransferStabilizationBase< Conductivity >, GRINS::IncompressibleNavierStokesStabilizationBase< Viscosity >, GRINS::SpalartAllmarasStabilizationBase< Viscosity >, GRINS::ParsedSourceTerm, and GRINS::VariablePinning.

Definition at line 124 of file physics.C.

125  {
126  return;
127  }
void GRINS::Physics::init_ics ( libMesh::FEMSystem *  system,
libMesh::CompositeFunction< libMesh::Number > &  all_ics 
)

Definition at line 113 of file physics.C.

References _ic_handler, and GRINS::ICHandlingBase::init_ic_data().

115  {
116  if( _ic_handler )
117  {
118  _ic_handler->init_ic_data( *system, all_ics );
119  }
120 
121  return;
122  }
GRINS::ICHandlingBase * _ic_handler
Definition: physics.h:258
virtual void init_ic_data(const libMesh::FEMSystem &system, libMesh::CompositeFunction< libMesh::Number > &all_ics)
Override this method to initialize any system-dependent data.
virtual void GRINS::Physics::init_variables ( libMesh::FEMSystem *  )
inlinevirtual
static bool GRINS::Physics::is_axisymmetric ( )
inlinestatic
bool GRINS::Physics::is_steady ( ) const

Returns whether or not this physics is being solved with a steady solver.

Definition at line 97 of file physics.C.

References _is_steady.

Referenced by set_is_steady().

98  {
99  return _is_steady;
100  }
static bool _is_steady
Caches whether or not the solver that's being used is steady or not.
Definition: physics.h:266
virtual void GRINS::Physics::mass_residual ( bool  ,
AssemblyContext  
)
inlinevirtual
virtual void GRINS::Physics::nonlocal_constraint ( bool  ,
AssemblyContext  
)
inlinevirtual

Constraint part(s) of physics for scalar variables.

Reimplemented in GRINS::ScalarODE.

Definition at line 194 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::nonlocal_constraint().

195  {}
virtual void GRINS::Physics::nonlocal_mass_residual ( bool  ,
AssemblyContext  
)
inlinevirtual

Mass matrix part(s) for scalar variables.

Reimplemented in GRINS::ScalarODE, and GRINS::AveragedTurbine< Viscosity >.

Definition at line 206 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::nonlocal_mass_residual().

207  {}
virtual void GRINS::Physics::nonlocal_time_derivative ( bool  ,
AssemblyContext  
)
inlinevirtual

Time dependent part(s) of physics for scalar variables.

Reimplemented in GRINS::AveragedTurbine< Viscosity >, and GRINS::ScalarODE.

Definition at line 182 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::nonlocal_time_derivative().

183  {}
void GRINS::Physics::parse_enabled_subdomains ( const GetPot &  input,
const std::string &  physics_name 
)
protected

Definition at line 65 of file physics.C.

References _enabled_subdomains.

Referenced by GRINS::ElasticCableRayleighDamping< StressStrainLaw >::ElasticCableRayleighDamping(), GRINS::ElasticMembraneConstantPressure::ElasticMembraneConstantPressure(), GRINS::ElasticMembraneRayleighDamping< StressStrainLaw >::ElasticMembraneRayleighDamping(), and Physics().

67  {
68  int num_ids = input.vector_variable_size( "Physics/"+physics_name+"/enabled_subdomains" );
69 
70  for( int i = 0; i < num_ids; i++ )
71  {
72  libMesh::subdomain_id_type dumvar = input( "Physics/"+physics_name+"/enabled_subdomains", -1, i );
73  _enabled_subdomains.insert( dumvar );
74  }
75  }
std::set< libMesh::subdomain_id_type > _enabled_subdomains
Subdomains on which the current Physics class is enabled.
Definition: physics.h:261
virtual void GRINS::Physics::preassembly ( MultiphysicsSystem )
inlinevirtual

Perform any necessary setup before element assembly begins.

Definition at line 162 of file physics.h.

162 {};
void GRINS::Physics::register_postprocessing_vars ( const GetPot &  input,
PostProcessedQuantities< libMesh::Real > &  postprocessing 
)
virtual

Register name of postprocessed quantity with PostProcessedQuantities.

Each Physics class will need to cache an unsigned int corresponding to each postprocessed quantity. This will be used in computing the values and putting them in the CachedVariables object.

Reimplemented in GRINS::ParsedVelocitySource< Viscosity >, GRINS::VelocityPenalty< Viscosity >, GRINS::AveragedFan< Viscosity >, GRINS::IncompressibleNavierStokes< Viscosity >, GRINS::LowMachNavierStokes< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::HeatTransfer< Conductivity >, GRINS::ReactingLowMachNavierStokes< Mixture, Evaluator >, GRINS::ElasticCable< StressStrainLaw >, and GRINS::ElasticMembrane< StressStrainLaw >.

Definition at line 129 of file physics.C.

131  {
132  return;
133  }
virtual void GRINS::Physics::reinit ( MultiphysicsSystem )
inlinevirtual

Any reinitialization that needs to be done.

This is called through libMesh::FEMSystem::reinit, which is called e.g. after adaptive mesh refinement/coarsening. So, for Physics that need to reinit internally, then this method should be overridden.

Definition at line 168 of file physics.h.

168 {};
static void GRINS::Physics::set_is_axisymmetric ( bool  is_axisymmetric)
inlinestatic

Set whether we should treat the problem as axisymmetric.

Definition at line 129 of file physics.h.

References _is_axisymmetric, and is_axisymmetric().

Referenced by Physics().

static bool is_axisymmetric()
Definition: physics.h:132
static bool _is_axisymmetric
Caches whether we are solving an axisymmetric problem or not.
Definition: physics.h:269
void GRINS::Physics::set_is_steady ( bool  is_steady)

Sets whether this physics is to be solved with a steady solver or not.

Since the member variable is static, only needs to be called on a single physics.

Definition at line 91 of file physics.C.

References _is_steady, and is_steady().

92  {
94  return;
95  }
bool is_steady() const
Returns whether or not this physics is being solved with a steady solver.
Definition: physics.C:97
static bool _is_steady
Caches whether or not the solver that's being used is steady or not.
Definition: physics.h:266
void GRINS::Physics::set_time_evolving_vars ( libMesh::FEMSystem *  system)
virtual

Set which variables are time evolving.

Set those variables which evolve in time (as opposed to variables that behave like constraints). This is done separately from init_variables() because the MultiphysicsSystem must initialize its base class before time_evolving variables can be set. Default implementation is no time evolving variables.

Reimplemented in GRINS::SpalartAllmaras< Viscosity >, GRINS::ScalarODE, GRINS::LowMachNavierStokesBase< Viscosity, SpecificHeat, ThermalConductivity >, GRINS::AxisymmetricHeatTransfer< Conductivity >, GRINS::IncompressibleNavierStokesBase< Viscosity >, GRINS::AveragedTurbineBase< Viscosity >, GRINS::VelocityPenaltyBase< Viscosity >, GRINS::HeatTransferBase< Conductivity >, GRINS::ParsedVelocitySourceBase< Viscosity >, GRINS::ReactingLowMachNavierStokesAbstract, GRINS::ConvectionDiffusion, GRINS::SolidMechanicsAbstract, and GRINS::HeatConduction< Conductivity >.

Definition at line 102 of file physics.C.

103  {
104  return;
105  }
virtual void GRINS::Physics::side_constraint ( bool  ,
AssemblyContext  
)
inlinevirtual

Constraint part(s) of physics for boundaries of elements on the domain boundary.

Definition at line 190 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::side_constraint().

191  {}
virtual void GRINS::Physics::side_time_derivative ( bool  ,
AssemblyContext  
)
inlinevirtual

Time dependent part(s) of physics for boundaries of elements on the domain boundary.

Definition at line 178 of file physics.h.

Referenced by GRINS::MultiphysicsSystem::side_time_derivative().

179  {}

Member Data Documentation

std::set<libMesh::subdomain_id_type> GRINS::Physics::_enabled_subdomains
protected

Subdomains on which the current Physics class is enabled.

Definition at line 261 of file physics.h.

Referenced by check_var_subdomain_consistency(), enabled_on_elem(), and parse_enabled_subdomains().

GRINS::ICHandlingBase* GRINS::Physics::_ic_handler
protected
bool GRINS::Physics::_is_axisymmetric = false
staticprotected

Caches whether we are solving an axisymmetric problem or not.

Definition at line 269 of file physics.h.

Referenced by is_axisymmetric(), and set_is_axisymmetric().

bool GRINS::Physics::_is_steady = false
staticprotected

Caches whether or not the solver that's being used is steady or not.

This is need, for example, in flow stabilization as the tau terms change depending on whether the solver is steady or unsteady.

Definition at line 266 of file physics.h.

Referenced by is_steady(), and set_is_steady().

const PhysicsName GRINS::Physics::_physics_name
protected

Name of the physics object. Used for reading physics specific inputs.

We use a reference because the physics names are const global objects in GRINS namespace

No, we use a copy, because otherwise as soon as the memory in std::set<std::string> requested_physics gets overwritten we get in trouble.

Definition at line 256 of file physics.h.

Referenced by GRINS::SourceTermBase::parse_var_info(), and GRINS::VelocityPenaltyBase< Viscosity >::VelocityPenaltyBase().


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

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