SPH
Public Member Functions | List of all members
MultiCriterion Class Reference

Helper criterion, wrapping multiple criteria under ITimeStepCriterion interface. More...

#include <TimeStepCriterion.h>

Inheritance diagram for MultiCriterion:
ITimeStepCriterion Polymorphic

Public Member Functions

 MultiCriterion (const RunSettings &settings)
 
 MultiCriterion (Array< AutoPtr< ITimeStepCriterion >> &&criteria, const Float maxChange, const Float initial)
 
virtual TimeStep compute (IScheduler &scheduler, Storage &storage, const Float maxStep, Statistics &stats) override
 Computes the value of the time step. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Helper criterion, wrapping multiple criteria under ITimeStepCriterion interface.

Time step critaria can be added automatically based on parameter RunSettingsId::TIMESTEPPING_CRITERION in settings, or they can be specified explicitly. Each criterion computes a time step and the minimal time step of these is returned.

Definition at line 159 of file TimeStepCriterion.h.

Constructor & Destructor Documentation

◆ MultiCriterion() [1/2]

MultiCriterion::MultiCriterion ( const RunSettings settings)
explicit

Definition at line 346 of file TimeStepCriterion.cpp.

◆ MultiCriterion() [2/2]

MultiCriterion::MultiCriterion ( Array< AutoPtr< ITimeStepCriterion >> &&  criteria,
const Float  maxChange,
const Float  initial 
)

Definition at line 366 of file TimeStepCriterion.cpp.

Member Function Documentation

◆ compute()

TimeStep MultiCriterion::compute ( IScheduler scheduler,
Storage storage,
const Float  maxStep,
Statistics stats 
)
overridevirtual

Computes the value of the time step.

Parameters
schedulerScheduler than can be used for parallelization.
storageStorage containing all physical quantities from which the time step is determined.
maxStepMaximal allowed time step.
statsUsed to save statistics of the criterion.
Returns
Computed time step and ID of criterion that determined the value.

Implements ITimeStepCriterion.

Definition at line 373 of file TimeStepCriterion.cpp.


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