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 26 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 }
Real _cfl_timestep
The minimum timestep computed using CFL condition.

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 61 of file LevelSetVelocityInterface.h.

◆ 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 }
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...

◆ finalize()

void LevelSetCFLCondition::finalize ( )
override

Definition at line 45 of file LevelSetCFLCondition.C.

46 {
47  gatherMin(_cfl_timestep);
48 }
Real _cfl_timestep
The minimum timestep computed using CFL condition.

◆ getValue()

PostprocessorValue LevelSetCFLCondition::getValue ( )
overridevirtual

Definition at line 58 of file LevelSetCFLCondition.C.

59 {
60  return _cfl_timestep;
61 }
Real _cfl_timestep
The minimum timestep computed using CFL condition.

◆ initialize()

void LevelSetCFLCondition::initialize ( )
inlineoverride

Definition at line 30 of file LevelSetCFLCondition.h.

30 {}

◆ 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 }
Real _cfl_timestep
The minimum timestep computed using CFL condition.
Computes the maximum timestep based on the CFL condition.

Member Data Documentation

◆ _cfl_timestep

Real LevelSetCFLCondition::_cfl_timestep
private

The minimum timestep computed using CFL condition.

Definition at line 41 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 38 of file LevelSetCFLCondition.h.

Referenced by execute().

◆ _velocity

RealVectorValue LevelSetVelocityInterface< ElementPostprocessor >::_velocity
protectedinherited

Storage for velocity vector.

Definition at line 56 of file LevelSetVelocityInterface.h.

◆ _velocity_x

const VariableValue& LevelSetVelocityInterface< ElementPostprocessor >::_velocity_x
protectedinherited

Coupled velocity variables

Definition at line 43 of file LevelSetVelocityInterface.h.

Referenced by execute().

◆ _velocity_y

const VariableValue& LevelSetVelocityInterface< ElementPostprocessor >::_velocity_y
protectedinherited

Definition at line 44 of file LevelSetVelocityInterface.h.

Referenced by execute().

◆ _velocity_z

const VariableValue& LevelSetVelocityInterface< ElementPostprocessor >::_velocity_z
protectedinherited

Definition at line 45 of file LevelSetVelocityInterface.h.

Referenced by execute().

◆ _x_vel_var

const unsigned int LevelSetVelocityInterface< ElementPostprocessor >::_x_vel_var
protectedinherited

Coupled velocity identifiers

Definition at line 50 of file LevelSetVelocityInterface.h.

◆ _y_vel_var

const unsigned int LevelSetVelocityInterface< ElementPostprocessor >::_y_vel_var
protectedinherited

Definition at line 51 of file LevelSetVelocityInterface.h.

◆ _z_vel_var

const unsigned int LevelSetVelocityInterface< ElementPostprocessor >::_z_vel_var
protectedinherited

Definition at line 52 of file LevelSetVelocityInterface.h.


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