BISICLES AMR ice sheet model  0.9
Public Types | Public Member Functions | Friends | List of all members
AmrIce::Observer Class Referenceabstract

part of Observer-Observee implementation More...

#include <AmrIce.H>

Inheritance diagram for AmrIce::Observer:
Inheritance graph
[legend]

Public Types

enum  Notification {
  PostInitGrids, PreVelocitySolve, PostVelocitySolve, PostGeometryUpdate,
  PreCalving, PostCalving
}
 

Public Member Functions

virtual ~Observer ()
 
virtual void notify (const Notification, AmrIce &)=0
 General purpose notify method. More...
 
virtual void addPlotVars (Vector< std::string > &a_vars)
 Fat interface members. More...
 
virtual void writePlotData (LevelData< FArrayBox > &a_data, int a_level)
 copy level a_level plot data to LevelData<FArrayBox>& a_data More...
 
virtual void addCheckVars (Vector< std::string > &a_vars)
 fill a_var with the names of variables to add to the checkpoint file More...
 
virtual void writeCheckData (HDF5Handle &a_handle, int a_level)
 copy level a_level checkpoint data to LevelData<FArrayBox>& a_data More...
 
virtual void readCheckData (HDF5Handle &a_handle, HDF5HeaderData &a_header, int a_level, const DisjointBoxLayout &a_grids)
 read level a_level checkpoint data from LevelData<FArrayBox>& a_data More...
 

Friends

class AmrIce
 

Detailed Description

part of Observer-Observee implementation

Similar to the implementation in Chombo/lib/src/AMREllitic/Multigrid.H

Member Enumeration Documentation

◆ Notification

Enumerator
PostInitGrids 
PreVelocitySolve 
PostVelocitySolve 
PostGeometryUpdate 
PreCalving 
PostCalving 

Constructor & Destructor Documentation

◆ ~Observer()

virtual AmrIce::Observer::~Observer ( )
inlinevirtual

Member Function Documentation

◆ addCheckVars()

virtual void AmrIce::Observer::addCheckVars ( Vector< std::string > &  a_vars)
inlinevirtual

fill a_var with the names of variables to add to the checkpoint file

Reimplemented in DamageIceObserver, and MelangeIceObserver.

◆ addPlotVars()

virtual void AmrIce::Observer::addPlotVars ( Vector< std::string > &  a_vars)
inlinevirtual

Fat interface members.

For now, these allow observers to add data to the plot and checkpoint files, and read checkpoint data. This might not be the most graceful design, but it fits with the way plot and checkpoint files have been done up till now add the names of variables to add to the plot file to a_var, in the order they will be written

Reimplemented in DamageIceObserver, and MelangeIceObserver.

Referenced by ~Observer().

◆ notify()

virtual void AmrIce::Observer::notify ( const Notification  ,
AmrIce  
)
pure virtual

General purpose notify method.

Implemented in DamageIceObserver, and MelangeIceObserver.

Referenced by AmrIce::removeObserver(), and ~Observer().

◆ readCheckData()

virtual void AmrIce::Observer::readCheckData ( HDF5Handle &  a_handle,
HDF5HeaderData &  a_header,
int  a_level,
const DisjointBoxLayout &  a_grids 
)
inlinevirtual

read level a_level checkpoint data from LevelData<FArrayBox>& a_data

Reimplemented in DamageIceObserver, and MelangeIceObserver.

◆ writeCheckData()

virtual void AmrIce::Observer::writeCheckData ( HDF5Handle &  a_handle,
int  a_level 
)
inlinevirtual

copy level a_level checkpoint data to LevelData<FArrayBox>& a_data

Reimplemented in DamageIceObserver, and MelangeIceObserver.

◆ writePlotData()

virtual void AmrIce::Observer::writePlotData ( LevelData< FArrayBox > &  a_data,
int  a_level 
)
inlinevirtual

copy level a_level plot data to LevelData<FArrayBox>& a_data

Reimplemented in DamageIceObserver, and MelangeIceObserver.

Friends And Related Function Documentation

◆ AmrIce

friend class AmrIce
friend

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