Timestep controller that calculates the timestep using the min (max) value of a product of variables raised to corresponding powers. Variables are assumed fluid-like.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | userDefined | = | .false. |
True only if user explicitly sets it to true |
|
type(MPIController), | private | :: | mpiCont |
Local copy of MPI controller used for allreduce calls |
|||
integer(kind=ik), | private, | allocatable, dimension(:) | :: | reqVarIndices |
Indices of variables to be raised to a power and multiplied |
||
real(kind=rk), | private, | allocatable, dimension(:) | :: | reqVarPowers |
Powers corresponding to required variables |
||
real(kind=rk), | private | :: | multConst |
Optional multiplicative const |
|||
logical, | private | :: | useMaxVal |
Use max value of product = false by default |
|||
logical, | private | :: | rescaleTimestep |
Multiply the calculated timestep with currentTimestep dummy argument in evaluateTimestep |
Getter for userDefined
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Object), | intent(in) | :: | this |
Set userDefined to .true.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Object), | intent(inout) | :: | this |
Set userDefined to .false.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(Object), | intent(inout) | :: | this |
Simple timestep controller initialization routine
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(SimpleTimestepController), | intent(inout) | :: | this | |||
type(MPIController), | intent(in) | :: | mpiCont |
Reference MPI controller |
||
type(VariableContainer), | intent(in) | :: | varCont |
Reference variable container |
||
type(StringArray), | intent(in), | dimension(:) | :: | reqVars |
Required variable list |
|
real(kind=rk), | intent(in), | dimension(:) | :: | reqVarPowers |
Powers corresponding to required variables |
|
real(kind=rk), | intent(in), | optional | :: | multConst |
Normalization constant |
|
logical, | intent(in), | optional | :: | useMaxVal |
True if max value of product is used instead of min |
|
logical, | intent(in), | optional | :: | rescaleTimestep |
True if currentTimestep is rescaled using the calculated timestep value |
Calculate timestep as min(max) of variable product
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(SimpleTimestepController), | intent(inout) | :: | this | |||
class(VariableContainer), | intent(in) | :: | inputVars |
Variable container used to calculate timestep |
||
real(kind=rk), | intent(in) | :: | currentTimestep |
Current timestep to be used if the controller rescales timesteps |