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

Computes the maximum timestep based on the CFL condition. More...

#include <LevelSetCFLCondition.h>

Inheritance diagram for LevelSetCFLCondition:
[legend]

Public Member Functions

 LevelSetCFLCondition (const InputParameters &parameters)
 
void initialize () override
 
void execute () override
 
void finalize () override
 
void threadJoin (const UserObject &user_object) override
 
virtual PostprocessorValue getValue () override
 

Protected Member Functions

void computeQpVelocity ()
 This method should be called when the velocity vector needs to be updated, this is not done automatically to avoid populating a vector that is not used. More...
 

Protected Attributes

RealVectorValue _velocity
 Storage for velocity vector. More...
 
const VariableValue & _velocity_x
 
const VariableValue & _velocity_y
 
const VariableValue & _velocity_z
 
const unsigned int _x_vel_var
 
const unsigned int _y_vel_var
 
const unsigned int _z_vel_var
 

Private Attributes

Real _max_velocity
 The max velocity on an element, this is done simply to avoid creating temporary calls to execute. More...
 
Real _cfl_timestep
 The minimum timestep computed using CFL condition. More...
 

Detailed Description

Computes the maximum timestep based on the CFL condition.

Definition at line 24 of file LevelSetCFLCondition.h.

Constructor & Destructor Documentation

LevelSetCFLCondition::LevelSetCFLCondition ( const InputParameters &  parameters)

Definition at line 21 of file LevelSetCFLCondition.C.

23  _cfl_timestep(std::numeric_limits<Real>::max())
24 {
25 }
Real _cfl_timestep
The minimum timestep computed using CFL condition.

Member Function Documentation

void LevelSetVelocityInterface< ElementPostprocessor >::computeQpVelocity ( )
protectedinherited

This method should be called when the velocity vector needs to be updated, this is not done automatically to avoid populating a vector that is not used.

void LevelSetCFLCondition::execute ( )
override

Definition at line 28 of file LevelSetCFLCondition.C.

Referenced by initialize().

29 {
30  // Compute maximum velocity
31  _max_velocity = std::numeric_limits<Real>::min();
32  for (unsigned int qp = 0; qp < _q_point.size(); ++qp)
33  {
34  RealVectorValue vel(_velocity_x[qp], _velocity_y[qp], _velocity_z[qp]);
35  _max_velocity = std::max(_max_velocity, std::abs(vel.norm()));
36  }
37  _cfl_timestep = std::min(_cfl_timestep, _current_elem->hmin() / _max_velocity);
38 }
Real _cfl_timestep
The minimum timestep computed using CFL condition.
Real _max_velocity
The max velocity on an element, this is done simply to avoid creating temporary calls to execute...
void LevelSetCFLCondition::finalize ( )
override

Definition at line 41 of file LevelSetCFLCondition.C.

Referenced by initialize().

42 {
43  gatherMin(_cfl_timestep);
44 }
Real _cfl_timestep
The minimum timestep computed using CFL condition.
PostprocessorValue LevelSetCFLCondition::getValue ( )
overridevirtual

Definition at line 54 of file LevelSetCFLCondition.C.

Referenced by initialize().

55 {
56  return _cfl_timestep;
57 }
Real _cfl_timestep
The minimum timestep computed using CFL condition.
void LevelSetCFLCondition::initialize ( )
inlineoverride

Definition at line 28 of file LevelSetCFLCondition.h.

28 {}
void LevelSetCFLCondition::threadJoin ( const UserObject &  user_object)
override

Definition at line 47 of file LevelSetCFLCondition.C.

Referenced by initialize().

48 {
49  const LevelSetCFLCondition & cfl = static_cast<const LevelSetCFLCondition &>(user_object);
50  _cfl_timestep = std::min(_cfl_timestep, cfl._cfl_timestep);
51 }
Real _cfl_timestep
The minimum timestep computed using CFL condition.
Computes the maximum timestep based on the CFL condition.

Member Data Documentation

Real LevelSetCFLCondition::_cfl_timestep
private

The minimum timestep computed using CFL condition.

Definition at line 39 of file LevelSetCFLCondition.h.

Referenced by execute(), finalize(), getValue(), and threadJoin().

Real LevelSetCFLCondition::_max_velocity
private

The max velocity on an element, this is done simply to avoid creating temporary calls to execute.

Definition at line 36 of file LevelSetCFLCondition.h.

Referenced by execute().

RealVectorValue LevelSetVelocityInterface< ElementPostprocessor >::_velocity
protectedinherited

Storage for velocity vector.

Definition at line 54 of file LevelSetVelocityInterface.h.

const VariableValue& LevelSetVelocityInterface< ElementPostprocessor >::_velocity_x
protectedinherited

Coupled velocity variables

Definition at line 41 of file LevelSetVelocityInterface.h.

Referenced by execute().

const VariableValue& LevelSetVelocityInterface< ElementPostprocessor >::_velocity_y
protectedinherited

Definition at line 42 of file LevelSetVelocityInterface.h.

Referenced by execute().

const VariableValue& LevelSetVelocityInterface< ElementPostprocessor >::_velocity_z
protectedinherited

Definition at line 43 of file LevelSetVelocityInterface.h.

Referenced by execute().

const unsigned int LevelSetVelocityInterface< ElementPostprocessor >::_x_vel_var
protectedinherited

Coupled velocity identifiers

Definition at line 48 of file LevelSetVelocityInterface.h.

const unsigned int LevelSetVelocityInterface< ElementPostprocessor >::_y_vel_var
protectedinherited

Definition at line 49 of file LevelSetVelocityInterface.h.

const unsigned int LevelSetVelocityInterface< ElementPostprocessor >::_z_vel_var
protectedinherited

Definition at line 50 of file LevelSetVelocityInterface.h.


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