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 25 of file LevelSetCFLCondition.h.

Constructor & Destructor Documentation

◆ LevelSetCFLCondition()

LevelSetCFLCondition::LevelSetCFLCondition ( const InputParameters &  parameters)

Definition at line 25 of file LevelSetCFLCondition.C.

27  _cfl_timestep(std::numeric_limits<Real>::max())
28 {
29 }

Member Function Documentation

◆ computeQpVelocity()

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.

Definition at line 60 of file LevelSetVelocityInterface.h.

61 {
62  _velocity(0) = _velocity_x[T::_qp];
63  _velocity(1) = _velocity_y[T::_qp];
64  _velocity(2) = _velocity_z[T::_qp];
65 }

◆ execute()

void LevelSetCFLCondition::execute ( )
override

Definition at line 32 of file LevelSetCFLCondition.C.

33 {
34  // Compute maximum velocity
35  _max_velocity = std::numeric_limits<Real>::min();
36  for (unsigned int qp = 0; qp < _q_point.size(); ++qp)
37  {
38  RealVectorValue vel(_velocity_x[qp], _velocity_y[qp], _velocity_z[qp]);
39  _max_velocity = std::max(_max_velocity, std::abs(vel.norm()));
40  }
41  _cfl_timestep = std::min(_cfl_timestep, _current_elem->hmin() / _max_velocity);
42 }

◆ finalize()

void LevelSetCFLCondition::finalize ( )
override

Definition at line 45 of file LevelSetCFLCondition.C.

46 {
47  gatherMin(_cfl_timestep);
48 }

◆ getValue()

PostprocessorValue LevelSetCFLCondition::getValue ( )
overridevirtual

Definition at line 58 of file LevelSetCFLCondition.C.

59 {
60  return _cfl_timestep;
61 }

◆ initialize()

void LevelSetCFLCondition::initialize ( )
inlineoverride

Definition at line 29 of file LevelSetCFLCondition.h.

29 {}

◆ threadJoin()

void LevelSetCFLCondition::threadJoin ( const UserObject &  user_object)
override

Definition at line 51 of file LevelSetCFLCondition.C.

52 {
53  const LevelSetCFLCondition & cfl = static_cast<const LevelSetCFLCondition &>(user_object);
54  _cfl_timestep = std::min(_cfl_timestep, cfl._cfl_timestep);
55 }

Member Data Documentation

◆ _cfl_timestep

Real LevelSetCFLCondition::_cfl_timestep
private

The minimum timestep computed using CFL condition.

Definition at line 40 of file LevelSetCFLCondition.h.

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

◆ _max_velocity

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 37 of file LevelSetCFLCondition.h.

Referenced by execute().

◆ _velocity

RealVectorValue LevelSetVelocityInterface< ElementPostprocessor >::_velocity
protectedinherited

Storage for velocity vector.

Definition at line 55 of file LevelSetVelocityInterface.h.

◆ _velocity_x

const VariableValue& LevelSetVelocityInterface< ElementPostprocessor >::_velocity_x
protectedinherited

Coupled velocity variables

Definition at line 42 of file LevelSetVelocityInterface.h.

◆ _velocity_y

const VariableValue& LevelSetVelocityInterface< ElementPostprocessor >::_velocity_y
protectedinherited

Definition at line 43 of file LevelSetVelocityInterface.h.

◆ _velocity_z

const VariableValue& LevelSetVelocityInterface< ElementPostprocessor >::_velocity_z
protectedinherited

Definition at line 44 of file LevelSetVelocityInterface.h.

◆ _x_vel_var

const unsigned int LevelSetVelocityInterface< ElementPostprocessor >::_x_vel_var
protectedinherited

Coupled velocity identifiers

Definition at line 49 of file LevelSetVelocityInterface.h.

◆ _y_vel_var

const unsigned int LevelSetVelocityInterface< ElementPostprocessor >::_y_vel_var
protectedinherited

Definition at line 50 of file LevelSetVelocityInterface.h.

◆ _z_vel_var

const unsigned int LevelSetVelocityInterface< ElementPostprocessor >::_z_vel_var
protectedinherited

Definition at line 51 of file LevelSetVelocityInterface.h.


The documentation for this class was generated from the following files:
LevelSetCFLCondition::_max_velocity
Real _max_velocity
The max velocity on an element, this is done simply to avoid creating temporary calls to execute.
Definition: LevelSetCFLCondition.h:37
LevelSetVelocityInterface< ElementPostprocessor >::_velocity
RealVectorValue _velocity
Storage for velocity vector.
Definition: LevelSetVelocityInterface.h:55
LevelSetVelocityInterface< ElementPostprocessor >
LevelSetCFLCondition::_cfl_timestep
Real _cfl_timestep
The minimum timestep computed using CFL condition.
Definition: LevelSetCFLCondition.h:40
LevelSetCFLCondition
Computes the maximum timestep based on the CFL condition.
Definition: LevelSetCFLCondition.h:25
LevelSetVelocityInterface< ElementPostprocessor >::_velocity_y
const VariableValue & _velocity_y
Definition: LevelSetVelocityInterface.h:43
LevelSetVelocityInterface< ElementPostprocessor >::_velocity_x
const VariableValue & _velocity_x
Definition: LevelSetVelocityInterface.h:42
LevelSetVelocityInterface< ElementPostprocessor >::_velocity_z
const VariableValue & _velocity_z
Definition: LevelSetVelocityInterface.h:44