ug4
|
Base class for a subject notifying observers attachment. More...
#include <time_integrator_subject.hpp>
Inherited by ug::ITimeIntegrator< class, class >.
Public Types | |
typedef ITimeIntegratorStageObserver_end< TDomain, TAlgebra > | end_observer_type |
typedef ITimeIntegratorStageObserver_finalize< TDomain, TAlgebra > | finalize_observer_type |
typedef GridFunction< TDomain, TAlgebra > | grid_function_type |
typedef ITimeIntegratorStageObserver_init< TDomain, TAlgebra > | init_observer_type |
enum | observer_group_type { TIO_GROUP_INIT_STEP =0 , TIO_GROUP_REWIND_STEP , TIO_GROUP_FINALIZE_STEP , TIO_GROUP_PREPROCESS_STEP , TIO_GROUP_POSTPROCESS_STEP , TIO_GROUP_START , TIO_GROUP_END , TIO_GROUP_SIZE } |
typedef ITimeIntegratorStageObserver_postprocess< TDomain, TAlgebra > | postprocess_observer_type |
typedef ITimeIntegratorStageObserver_preprocess< TDomain, TAlgebra > | preprocess_observer_type |
typedef std::vector< SmartPtr< process_observer_type > > | process_observer_container_type |
typedef ITimeIntegratorObserver< TDomain, TAlgebra > | process_observer_type |
typedef ITimeIntegratorStageObserver_rewind< TDomain, TAlgebra > | rewind_observer_type |
typedef ITimeIntegratorStageObserver_start< TDomain, TAlgebra > | start_observer_type |
Public Member Functions | |
void | attach_end_observer (SmartPtr< process_observer_type > obs) |
void | attach_finalize_observer (SmartPtr< process_observer_type > obs) |
void | attach_init_observer (SmartPtr< process_observer_type > obs) |
void | attach_observer (SmartPtr< process_observer_type > obs) |
void | attach_postprocess_observer (SmartPtr< process_observer_type > obs) |
void | attach_preprocess_observer (SmartPtr< process_observer_type > obs) |
void | attach_rewind_observer (SmartPtr< process_observer_type > obs) |
void | attach_start_observer (SmartPtr< process_observer_type > obs) |
void | reset_observers () |
Protected Member Functions | |
void | attach_to_group (int tGroup, SmartPtr< process_observer_type > obs) |
register observer (default: postprocess) More... | |
template<int tGroup> | |
void | attach_to_group (SmartPtr< process_observer_type > obs) |
register observer (default: postprocess) More... | |
template<int tGroup> | |
bool | notify_group (SmartPtr< grid_function_type > u, int step, number time, number dt) |
Notify all observers for a certain group. More... | |
Protected Attributes | |
std::vector< SmartPtr< end_observer_type > > | m_vEndObservers |
std::vector< SmartPtr< finalize_observer_type > > | m_vFinalizeObservers |
std::vector< SmartPtr< init_observer_type > > | m_vInitObservers |
std::vector< SmartPtr< postprocess_observer_type > > | m_vPostprocessObservers |
std::vector< SmartPtr< preprocess_observer_type > > | m_vPreprocessObservers |
process_observer_container_type | m_vProcessObservers [TIO_GROUP_SIZE] |
std::vector< SmartPtr< rewind_observer_type > > | m_vRewindObservers |
std::vector< SmartPtr< start_observer_type > > | m_vStartObservers |
Base class for a subject notifying observers attachment.
Provides the option to perform pre-/postprocessing for a (tentative step for evolving from t -> t+dt). Seven cases are distinguished 1) INIT (STEP) : Called at t=t_i before time step is executed. Contains solution u0=u(t0). 2) FINALIZE (STEP) : Called at t=t_i+dt, after time step has been executed and can be accepted. Provides solution u = u(t+dt). 3) REWIND (STEP) : Called at t=t_i+dt, after time step has been executed, but must be rejected. Provides (rejected) solution u = u(t+dt). 4) PREPROCESS (STEP) : Called at t=t_i before newton solver is executed (if applicable). Contains solution u0=u(t0). This may happen multiple times per time step. 5) POSTPROCESS (STEP) : Called at t=t_i+dt, after newton solver has been executed (if applicable). Provides solution u = u(t+dt). This may happen multiple times per time step. 6) START : Called at t=t_0, at the beginning of the time integration process (start of the simulation) 7) END : Called at t=T, at the end of the time integration process (end of the simulation)
typedef ITimeIntegratorStageObserver_end<TDomain, TAlgebra> ug::TimeIntegratorSubject< TDomain, TAlgebra >::end_observer_type |
typedef ITimeIntegratorStageObserver_finalize<TDomain, TAlgebra> ug::TimeIntegratorSubject< TDomain, TAlgebra >::finalize_observer_type |
typedef GridFunction<TDomain, TAlgebra> ug::TimeIntegratorSubject< TDomain, TAlgebra >::grid_function_type |
typedef ITimeIntegratorStageObserver_init<TDomain, TAlgebra> ug::TimeIntegratorSubject< TDomain, TAlgebra >::init_observer_type |
typedef ITimeIntegratorStageObserver_postprocess<TDomain, TAlgebra> ug::TimeIntegratorSubject< TDomain, TAlgebra >::postprocess_observer_type |
typedef ITimeIntegratorStageObserver_preprocess<TDomain, TAlgebra> ug::TimeIntegratorSubject< TDomain, TAlgebra >::preprocess_observer_type |
typedef std::vector<SmartPtr<process_observer_type> > ug::TimeIntegratorSubject< TDomain, TAlgebra >::process_observer_container_type |
typedef ITimeIntegratorObserver<TDomain, TAlgebra> ug::TimeIntegratorSubject< TDomain, TAlgebra >::process_observer_type |
typedef ITimeIntegratorStageObserver_rewind<TDomain, TAlgebra> ug::TimeIntegratorSubject< TDomain, TAlgebra >::rewind_observer_type |
typedef ITimeIntegratorStageObserver_start<TDomain, TAlgebra> ug::TimeIntegratorSubject< TDomain, TAlgebra >::start_observer_type |
enum ug::TimeIntegratorSubject::observer_group_type |
|
inline |
|
inline |
|
inline |
|
inline |
Attach statically mapped observers to their respective stages. Other observers are mapped to the finalize stage.
References ug::TimeIntegratorSubject< TDomain, TAlgebra >::attach_finalize_observer().
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
register observer (default: postprocess)
References ug::TimeIntegratorSubject< TDomain, TAlgebra >::m_vProcessObservers.
|
inlineprotected |
register observer (default: postprocess)
References ug::TimeIntegratorSubject< TDomain, TAlgebra >::m_vProcessObservers.
|
inlineprotected |
Notify all observers for a certain group.
References ug::TimeIntegratorSubject< TDomain, TAlgebra >::m_vProcessObservers.
|
inline |
References ug::TimeIntegratorSubject< TDomain, TAlgebra >::m_vEndObservers, ug::TimeIntegratorSubject< TDomain, TAlgebra >::m_vFinalizeObservers, ug::TimeIntegratorSubject< TDomain, TAlgebra >::m_vInitObservers, ug::TimeIntegratorSubject< TDomain, TAlgebra >::m_vPostprocessObservers, ug::TimeIntegratorSubject< TDomain, TAlgebra >::m_vPreprocessObservers, ug::TimeIntegratorSubject< TDomain, TAlgebra >::m_vProcessObservers, ug::TimeIntegratorSubject< TDomain, TAlgebra >::m_vRewindObservers, ug::TimeIntegratorSubject< TDomain, TAlgebra >::m_vStartObservers, ug::TimeIntegratorSubject< TDomain, TAlgebra >::TIO_GROUP_END, ug::TimeIntegratorSubject< TDomain, TAlgebra >::TIO_GROUP_FINALIZE_STEP, ug::TimeIntegratorSubject< TDomain, TAlgebra >::TIO_GROUP_INIT_STEP, ug::TimeIntegratorSubject< TDomain, TAlgebra >::TIO_GROUP_POSTPROCESS_STEP, ug::TimeIntegratorSubject< TDomain, TAlgebra >::TIO_GROUP_PREPROCESS_STEP, ug::TimeIntegratorSubject< TDomain, TAlgebra >::TIO_GROUP_REWIND_STEP, and ug::TimeIntegratorSubject< TDomain, TAlgebra >::TIO_GROUP_START.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |