IBAMR  IBAMR version 0.19.
Public Member Functions | Private Member Functions | List of all members
SAMRAI::xfer::RefineTransactionFactory< DIM > Class Template Referenceabstract

Abstract base class defining the interface for all concrete transaction factory objects that generate data transaction objects used with a RefineSchedule<DIM> object. A concrete subclass will allocate new transaction objects. This class is an example of the `‘Abstract Factory’' method described in the Design Patterns book by Gamma, et al. More...

#include <RefineTransactionFactory.h>

Inheritance diagram for SAMRAI::xfer::RefineTransactionFactory< DIM >:
Inheritance graph
[legend]

Public Member Functions

 RefineTransactionFactory ()
 Default constructor. More...
 
virtual ~RefineTransactionFactory ()
 Virtual destructor. More...
 
virtual void setRefineItems (const typename RefineClasses< DIM >::Data **refine_items, int num_refine_items)=0
 Pure virtual function to set the array of RefineClass::Data items associated with the refine schedule. Typical concrete transactions used by the schedule use this information to communicate data. This operation is called by the refine schedule during the execution of the RefineSchedule<DIM>::fillData() routine before data communication operations begin. More...
 
virtual void unsetRefineItems ()=0
 Pure virtual function to clear the array of RefineClass::Data items associated with the refine schedule. This operation is called by the refine schedule after data communication operations are complete. More...
 
virtual tbox::Pointer< tbox::Transactionallocate (tbox::Pointer< hier::PatchLevel< DIM > > dst_level, tbox::Pointer< hier::PatchLevel< DIM > > src_level, tbox::Pointer< hier::BoxOverlap< DIM > > overlap, int dst_patch_id, int src_patch_id, int ritem_id, const hier::Box< DIM > &box=hier::Box< DIM >(), bool use_time_interpolation=false, tbox::Pointer< tbox::Arena > pool=(tbox::Arena *) NULL) const =0
 Pure virtual function to allocate a concrete refine transaction object. This routine is called by the refine schedule during construction of the schedule. More...
 
virtual void setTransactionTime (double fill_time)
 Virtual function to set simulation time for transaction objects. This operation is called by the refine schedule during the execution of the RefineSchedule<DIM>::fillData() routine before data communication operations begin. This function is optional for the concrete transaction factory object. The default implementation is a no-op. More...
 
virtual void preprocessScratchSpace (tbox::Pointer< hier::PatchLevel< DIM > > level, double fill_time, const hier::ComponentSelector &preprocess_vector) const
 Virtual function allowing transaction factory to preprocess scratch space data before transactactions use it if they need to. This function is optional for the concrete transaction factory object.
The default implementation is a no-op. More...
 

Private Member Functions

 RefineTransactionFactory (const RefineTransactionFactory< DIM > &)
 
void operator= (const RefineTransactionFactory< DIM > &)
 

Detailed Description

template<int DIM>
class SAMRAI::xfer::RefineTransactionFactory< DIM >

To add a new type of Transaction object MyRefineTransaction:

  1. Implement a concrete RefineTransactionFactory<DIM> object as a subclass that is derived from this RefineTransactionFactory<DIM> base class. Implement the abstract virtual functions as appropriate for the concrete subclass; in particular, the allocate() function must return a new instance of the desired transaction object.
  2. The type of the transaction allocated by the concrete factory is a Transaction<DIM>. Thus, the new transaction object must be derived from the Transaction<DIM> base class and implement the abstract virtual functions declared by the base class.
See also
tbox::Transaction

Constructor & Destructor Documentation

◆ RefineTransactionFactory() [1/2]

◆ ~RefineTransactionFactory()

template<int DIM>
virtual SAMRAI::xfer::RefineTransactionFactory< DIM >::~RefineTransactionFactory ( )
virtual

◆ RefineTransactionFactory() [2/2]

template<int DIM>
SAMRAI::xfer::RefineTransactionFactory< DIM >::RefineTransactionFactory ( const RefineTransactionFactory< DIM > &  )
private

Member Function Documentation

◆ setRefineItems()

template<int DIM>
virtual void SAMRAI::xfer::RefineTransactionFactory< DIM >::setRefineItems ( const typename RefineClasses< DIM >::Data **  refine_items,
int  num_refine_items 
)
pure virtual

◆ unsetRefineItems()

template<int DIM>
virtual void SAMRAI::xfer::RefineTransactionFactory< DIM >::unsetRefineItems ( )
pure virtual

◆ allocate()

template<int DIM>
virtual tbox::Pointer<tbox::Transaction> SAMRAI::xfer::RefineTransactionFactory< DIM >::allocate ( tbox::Pointer< hier::PatchLevel< DIM > >  dst_level,
tbox::Pointer< hier::PatchLevel< DIM > >  src_level,
tbox::Pointer< hier::BoxOverlap< DIM > >  overlap,
int  dst_patch_id,
int  src_patch_id,
int  ritem_id,
const hier::Box< DIM > &  box = hier::Box< DIM >(),
bool  use_time_interpolation = false,
tbox::Pointer< tbox::Arena pool = (tbox::Arena *) NULL 
) const
pure virtual
Parameters
dst_leveltbox::Pointer to destination patch level.
src_leveltbox::Pointer to source patch level.
overlaptbox::Pointer to overlap region between patches.
dst_patch_idInteger index of destination patch in destination patch level.
src_patch_idInteger index of source patch in source patch level.
ritem_idInteger index of RefineClass::Data item associated with transaction.
boxOptional const reference to box defining region of refine transaction. Default is an empty box.
use_time_interpolationOptional boolean flag indicating whether the refine transaction involves time interpolation. Default is false.
poolOptional pointer to memory pool from which the refine transaction may be allocated. Default is null.

Implemented in SAMRAI::xfer::StandardRefineTransactionFactory< DIM >, SAMRAI::algs::OuternodeSumTransactionFactory< DIM >, and SAMRAI::algs::OuteredgeSumTransactionFactory< DIM >.

◆ setTransactionTime()

template<int DIM>
virtual void SAMRAI::xfer::RefineTransactionFactory< DIM >::setTransactionTime ( double  fill_time)
virtual

◆ preprocessScratchSpace()

template<int DIM>
virtual void SAMRAI::xfer::RefineTransactionFactory< DIM >::preprocessScratchSpace ( tbox::Pointer< hier::PatchLevel< DIM > >  level,
double  fill_time,
const hier::ComponentSelector preprocess_vector 
) const
virtual
Parameters
leveltbox::Pointer to patch level holding scratch data.
fill_timeDouble value of simulation time corresponding to RefineSchedule<DIM> operations.
preprocess_vectorConst reference to ComponentSelector that indicates patch data array indices of scratch patch data objects to preprocess.

Reimplemented in SAMRAI::algs::OuternodeSumTransactionFactory< DIM >, and SAMRAI::algs::OuteredgeSumTransactionFactory< DIM >.

◆ operator=()

template<int DIM>
void SAMRAI::xfer::RefineTransactionFactory< DIM >::operator= ( const RefineTransactionFactory< DIM > &  )
private

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