https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CFLTimeStepSize.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12// MOOSE includes
14
18template <bool is_ad>
20{
21public:
23
24 virtual void execute() override;
25
26 virtual void initialize() override;
27 virtual Real getValue() const override;
28 virtual void finalize() override;
29 virtual void threadJoin(const UserObject & y) override;
30
31protected:
33 const Real _CFL;
34
36 const std::vector<MaterialPropertyName> & _vel_names;
38 const std::vector<MaterialPropertyName> & _c_names;
39
41 const unsigned int _n_phases;
42
44 std::vector<const GenericMaterialProperty<Real, is_ad> *> _vel;
46 std::vector<const GenericMaterialProperty<Real, is_ad> *> _c;
47
49 Real _dt;
50
51public:
53};
54
CFLTimeStepSizeTempl< false > CFLTimeStepSize
CFLTimeStepSizeTempl< true > ADCFLTimeStepSize
const std::vector< double > y
Computes a time step size based on user-specified CFL number.
std::vector< const GenericMaterialProperty< Real, is_ad > * > _c
Sound speed material properties.
virtual void finalize() override
const std::vector< MaterialPropertyName > & _vel_names
Velocity material property name(s)
std::vector< const GenericMaterialProperty< Real, is_ad > * > _vel
Velocity material properties.
virtual void threadJoin(const UserObject &y) override
Real _dt
Time step size.
virtual Real getValue() const override
const unsigned int _n_phases
Number of phases.
const Real _CFL
User-specified CFL number.
const std::vector< MaterialPropertyName > & _c_names
Sound speed material property name(s)
static InputParameters validParams()
virtual void initialize() override
virtual void execute() override
const InputParameters & parameters() const