IBAMR  IBAMR version 0.19.
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM > Class Template Reference

Class MultiblockGriddingAlgorithm<DIM> manages gridding operations in SAMRAI for problems on multiblock domains. Specifically, it provides AMR patch hierarchy generation and regridding routines that may be used with a variety of AMR solution algorithms and application-specific numerical routines. More...

#include <MultiblockGriddingAlgorithm.h>

Inheritance diagram for SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >:
Inheritance graph
[legend]

Public Member Functions

 MultiblockGriddingAlgorithm (const std::string &object_name, tbox::Pointer< tbox::Database > input_db, tbox::Pointer< hier::MultiblockPatchHierarchy< DIM > > multiblock, tbox::Pointer< mesh::TagAndInitializeStrategy< DIM > > level_strategy, tbox::Pointer< mesh::BoxGeneratorStrategy< DIM > > generator, tbox::Pointer< mesh::LoadBalanceStrategy< DIM > > balancer, MultiblockGriddingTagger< DIM > *mb_tagger_strategy=(MultiblockGriddingTagger< DIM > *) NULL, bool register_for_restart=true)
 Construct the multiblock gridding algorithm. More...
 
virtual ~MultiblockGriddingAlgorithm ()
 
virtual void makeCoarsestLevel (tbox::Pointer< hier::BasePatchHierarchy< DIM > > multiblock, const double level_time, const hier::BoxArray< DIM > &override_boxes=0, const hier::ProcessorMapping &override_mapping=0)
 Create level 0 for a hierarchy. More...
 
virtual void makeFinerLevel (tbox::Pointer< hier::BasePatchHierarchy< DIM > > multiblock, const double level_time, const bool initial_time, const int tag_buffer, const double regrid_start_time)
 Create new finer level in hierarchy. More...
 
virtual void regridAllFinerLevels (tbox::Pointer< hier::BasePatchHierarchy< DIM > > multiblock, const int level_number, const double regrid_time, const tbox::Array< int > &tag_buffer, tbox::Array< double > regrid_start_time=tbox::Array< double >(), const bool level_is_coarsest_to_sync=true)
 Regrid all levels finer that a specified level. More...
 
virtual bool errorEstimationUsesTimeIntegration () const
 Return true if error estimation process uses time integration; otherwise, return false. More...
 
virtual int getErrorCoarsenRatio () const
 Return the error coarsen ratio. More...
 
virtual bool levelCanBeRefined (const int level_number) const
 Return true if level associated with the specified level number can * be refined; i.e., the level number is less than that of the finest level allowed in the hierarchy. Otherwise, false is returned. More...
 
virtual tbox::Pointer< mesh::TagAndInitializeStrategy< DIM > > getTagAndInitializeStrategy () const
 Return pointer to level gridding strategy data member. More...
 
virtual int getMaxLevels () const
 Return maximum number of levels allowed in hierarchy. More...
 
virtual const hier::IntVector< DIM > & getRatioToCoarserLevel (int level_number) const
 Return const reference to ratio between specified level and next coarser. More...
 
virtual double getEfficiencyTolerance (int level_number) const
 Return efficiency tolerance for clustering tags on level. More...
 
virtual double getCombineEfficiency (int level_number) const
 Return combine efficiency for clustering tags on level. More...
 
virtual int getProperNestingBuffer (int level_number) const
 Return proper nesting buffer width for level. More...
 
virtual const hier::IntVector< DIM > & getSmallestPatchSize (const int level_number) const
 Return const reference to smallest patch size for level. More...
 
virtual const hier::IntVector< DIM > & getLargestPatchSize (const int level_number) const
 Return const reference to largest patch size for level. More...
 
virtual void putToDatabase (tbox::Pointer< tbox::Database > db)
 Write object state out to the given database. More...
 

Private Member Functions

void getFromInput (tbox::Pointer< tbox::Database > db, bool is_from_restart)
 Read input data from database and initialize class members. More...
 
void getFromRestart ()
 Initialize members from restart file. More...
 
void findProperNestingBoxes (const tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy, const int level_number, const int block_number, hier::BoxList< DIM > &complement)
 Determine nesting boxes for a level. More...
 
void setTagsOnLevel (const int tag_value, const tbox::Pointer< hier::PatchLevel< DIM > > level, const int index, const hier::BoxArray< DIM > &boxes, const bool interior_only=true) const
 Set tags on specified boxes. More...
 
void bufferTagsOnLevel (const int tag_value, const tbox::Pointer< hier::MultiblockPatchLevel< DIM > > level, const int buffer_size) const
 Buffer each integer tag on patch level matching given tag value with a border of matching tags. More...
 
void findRefinementBoxes (hier::BoxArray< DIM > &fine_boxes, hier::ProcessorMapping &mapping, const tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy, const int coarse_level_number, const hier::BoxList< DIM > &nesting_boxes) const
 Find boxes where a fine level will be created. More...
 
void regridFinerLevel (tbox::Pointer< hier::MultiblockPatchHierarchy< DIM > > hierarchy, const int level_number, const double regrid_time, const int finest_level_not_regridded, const bool level_is_coarsest_to_sync, const tbox::Array< int > &tag_buffer, const tbox::Array< double > &regrid_start_time=NULL)
 Regrid an existing level and all finer levels. More...
 
virtual void getGriddingParameters (hier::IntVector< DIM > &smallest_patch, hier::IntVector< DIM > &smallest_box_to_refine, hier::IntVector< DIM > &largest_patch, hier::IntVector< DIM > &extend_ghosts, const tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy, const int level_number) const
 Get parameters that control gridding process. More...
 
 MultiblockGriddingAlgorithm (const MultiblockGriddingAlgorithm< DIM > &)
 
void operator= (const MultiblockGriddingAlgorithm< DIM > &)
 

Private Attributes

std::string d_object_name
 
bool d_registered_for_restart
 
int d_max_levels
 
tbox::Array< hier::IntVector< DIM > > d_ratio_to_coarser
 
tbox::Pointer< mesh::TagAndInitializeStrategy< DIM > > d_tag_init_strategy
 
tbox::Pointer< mesh::BoxGeneratorStrategy< DIM > > d_box_generator
 
tbox::Pointer< mesh::LoadBalanceStrategy< DIM > > d_load_balancer
 
MultiblockGriddingTagger< DIM > * d_mb_tagger_strategy
 
bool d_internal_tagger_strategy
 
tbox::Pointer< pdat::CellVariable< DIM, int > > d_tag
 
tbox::Pointer< pdat::CellVariable< DIM, int > > d_buf_tag
 
tbox::Pointer< pdat::CellVariable< DIM, int > > d_buf_src_tag
 
int d_tag_indx
 
int d_buf_tag_indx
 
int d_buf_tag_src_indx
 
tbox::Array< hier::IntVector< DIM > > d_smallest_patch_size
 
tbox::Array< hier::IntVector< DIM > > d_largest_patch_size
 
bool d_write_dumped_level_boxes
 
bool d_read_dumped_level_boxes
 
std::string d_regrid_boxes_filename
 
tbox::Array< tbox::Array< int > > d_regrid_box_counter
 
hier::BoxIOUtility< DIM > * d_regrid_box_utility
 
tbox::Array< intd_proper_nesting_buffer
 
bool d_allow_patches_smaller_than_ghostwidth
 
bool d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps
 
tbox::Array< doubled_efficiency_tolerance
 
tbox::Array< doubled_combine_efficiency
 
tbox::Pointer< xfer::MultiblockRefineAlgorithm< DIM > > d_bdry_fill_tags
 
tbox::Array< tbox::Pointer< xfer::MultiblockRefineSchedule< DIM > > > d_bdry_sched_tags
 
tbox::Array< tbox::Array< hier::BoxList< DIM > > > d_proper_nesting_boxes
 
int d_true_tag
 
int d_false_tag
 
tbox::Pointer< tbox::Timert_find_proper_nesting
 
tbox::Pointer< tbox::Timert_intersect_boxes_find_refinement
 
tbox::Pointer< tbox::Timert_load_balance_boxes
 
tbox::Pointer< tbox::Timert_bdry_fill_tags_create
 
tbox::Pointer< tbox::Timert_make_coarsest
 
tbox::Pointer< tbox::Timert_regrid_all_finer
 
tbox::Pointer< tbox::Timert_remove_intersections_regrid_all
 
tbox::Pointer< tbox::Timert_make_finer
 
tbox::Pointer< tbox::Timert_remove_intersections_make_finer
 
tbox::Pointer< tbox::Timert_set_tags
 
tbox::Pointer< tbox::Timert_buffer_tags
 
tbox::Pointer< tbox::Timert_bdry_fill_tags_comm
 
tbox::Pointer< tbox::Timert_find_refinement
 
tbox::Pointer< tbox::Timert_find_boxes_containing_tags
 
tbox::Pointer< tbox::Timert_remove_intersections_find_proper
 
tbox::Pointer< tbox::Timert_intersect_boxes_find_proper
 

Static Private Attributes

static int s_instance_counter
 
static int s_tag_indx
 
static int s_buf_tag_indx
 
static int s_buf_tag_src_indx
 

Detailed Description

template<int DIM>
class SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >

The three main functions provided by this class are:

These basic AMR operations are used to generate of individual levels in the AMR patch hierarchy at the beginning of a simulation, and regridding collections of levels during an adaptive calculation. More details are found in the comments accompanying each member function below.

The operations that identify cells for refinement on a single level and initialize data and solution algorithm-specific information that depend on the AMR hierarchy configuration are provided by the data member of type mesh::TagAndInitializeStrategy<DIM>. Operations that cluster tagged cells into a collection of box regions are provided by the mesh::BoxGeneratorStrategy<DIM> data member. Routines that load balancing patches on each level are provided by the mesh::LoadBalanceStrategy<DIM> data member. The collaboration between this class and each of those objects follows the Strategy design pattern. Each instantiation of this gridding algorithm class is configured with concrete implementations of those routines by passing appropriate objects into this constructor.

Initialization of an MultiblockGriddingAlgorithm<DIM> object is performed via a combination of default parameters and values read from input. Data read from input is summarized as follows:

Required input keys and data types:

Optional input keys, data types, and defaults:

Note that when continuing from restart, the input values in the input file override all values read in from the restart database.

The following represents sample input data for a three-dimensional problem:

*
*    // Required input: maximum bumber of levels in patch hierarchy
*    max_levels = 4
*
*    // Required input: vector ratio between each finer level and next coarser
*    ratio_to_coarser {
*       level_1 = 2, 2, 2
*       level_2 = 2, 2, 2
*       level_3 = 4, 4, 4
*    }
*
*    // Required input: int vector for largest patch size on each level.
*    largest_patch_size {
*       level_0 = 40, 40, 40
*       level_1 = 30, 30, 30
*       // all finer levels will use same values as level_1...
*    }
*
*    // Optional input:  buffer of one cell used on each level
*    proper_nesting_buffer = 1
*    grow_after_nesting = FALSE
*
*    // Optional input: int vector for smallest patch size on each level.
*    smallest_patch_size {
*       level_0 = 16, 16, 16
*       // all finer levels will use same values as level_0...
*    }
*
*    // Optional input: different efficiency tolerance for each coarser level
*    efficiency_tolerance = 0.80e0, 0.85e0, 0.90e0
*
*    // Optional input: combine efficiency is same for all levels.
*    combine_efficiency = 0.95e0
*
*    write_regrid_boxes = TRUE
*    regrid_boxes_filename = "regrid_boxes_32proc"
*
* 
See also
mesh::GriddingAlgorithm
mesh::TagAndInitializeStrategy
mesh::LoadBalanceStrategy
mesh::BoxGeneratorStrategy
mesh::MultiblockGriddingTagger

Constructor & Destructor Documentation

◆ MultiblockGriddingAlgorithm() [1/2]

template<int DIM>
SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::MultiblockGriddingAlgorithm ( const std::string &  object_name,
tbox::Pointer< tbox::Database input_db,
tbox::Pointer< hier::MultiblockPatchHierarchy< DIM > >  multiblock,
tbox::Pointer< mesh::TagAndInitializeStrategy< DIM > >  level_strategy,
tbox::Pointer< mesh::BoxGeneratorStrategy< DIM > >  generator,
tbox::Pointer< mesh::LoadBalanceStrategy< DIM > >  balancer,
MultiblockGriddingTagger< DIM > *  mb_tagger_strategy = (MultiblockGriddingTagger< DIM > *) NULL,
bool  register_for_restart = true 
)

The constructor for MultiblockGriddingAlgorithm<DIM> configures the gridding algorithm with the concrete strategy objects in the argument list. Gridding parameters are initialized from values provided in the specified input and in the restart database corresponding to the specified object_name argument. The constructor also registers this object for restart using the specified object name when the boolean argument is true. Whether object will write its state to restart files during program execution is determined by this argument. Note that it has a default state of true.

If assertion checking is turned on, an unrecoverable assertion will result if any of the input database, level strategy, box generator, or load balancer pointers is null. Exceptions may also be thrown if any checks for consistency among input parameters fail.

Parameters
object_nameName of object, to be used by RestartManager
input_dbInput database
multiblockMultiblock patch hierarchy for the application
level_strategyPointer to object that manages cell tagging
generatorPointer to object that generates boxes for a level
balancerPointer to load-balancing object
mb_tagger_strategyOptional pointer to multiblock tagging strategy used to communicate tags across block boundaries. If not provided, a default will be used. Should be NULL unless user has implemented a class inheriting from MultiblockGriddingTagger.
register_for_restartOptional boolean flag indicating whether object will be written to restart files. The default is true indicating that the object will be written to resatrt files.

◆ ~MultiblockGriddingAlgorithm()

template<int DIM>
virtual SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::~MultiblockGriddingAlgorithm ( )
virtual

Virtual destructor for MultiblockGriddingAlgorithm<DIM>.

◆ MultiblockGriddingAlgorithm() [2/2]

Member Function Documentation

◆ makeCoarsestLevel()

template<int DIM>
virtual void SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::makeCoarsestLevel ( tbox::Pointer< hier::BasePatchHierarchy< DIM > >  multiblock,
const double  level_time,
const hier::BoxArray< DIM > &  override_boxes = 0,
const hier::ProcessorMapping override_mapping = 0 
)
virtual

This routine will attempt to construct the coarsest level in an AMR multiblock patch hierarchy (i.e., level 0). If level 0 does not already exist, then the domain specification is checked against the constraints of the grid generation procedures. The level gridding strategy data member defines these constraints. Recall that the domain specification is maintained by the grid geometry object associated with the hierarchy. Generally, an unrecoverable exception will result if the constraints are not satisfied.

If level 0 already exists in the hierarchy, then the routine will generate a new level by re-applying the load balancing procedure to the existing level. Data will be moved from the old level to the new level and the pre-existing level 0 will be discarded. Note that this routine is different than the routine makeFinerLevel() below, which is used to construct levels 1 and finer. In particular, this routine does not select cells for refinement, whereas the other routine does.

Important note: If assertion checking is turned on, then an unrecoverable assertion will result if either the patch hierarchy or its grid geometry is NULL.

The two optional arguments exist only for compatibility with the base class BaseGriddingAlgorithm. If they are used in this function, they will be ignored.

Parameters
multiblockMultiblock patch hierarchy on which level is created
level_timeSimulation time for data on the new level
override_boxesoptional argument that will be ignored
override_mappingoptional argument that will be ignored

Implements SAMRAI::mesh::BaseGriddingAlgorithm< DIM >.

◆ makeFinerLevel()

template<int DIM>
virtual void SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::makeFinerLevel ( tbox::Pointer< hier::BasePatchHierarchy< DIM > >  multiblock,
const double  level_time,
const bool  initial_time,
const int  tag_buffer,
const double  regrid_start_time 
)
virtual

This routine attempts to create a new level in an AMR patch hierarchy finer than the finest level currently residing in the hierarchy. It will select cells for refinement on the finest level and construct a new finest level, if necessary. If no cells are selected for refinement, no new level will be added to the hierarchy. The boolean argument initial_time indicates whether the routine is called at the initial simulation time. If true, this routine is used to build individual levels during the construction of the AMR hierarchy at the initial simulation time. If false, the routine is being used to add new levels to the hierarchy at some later point. In either case, the time value is the current simulation time. Note that this routine cannot be used to construct the coarsest level in the hierarchy (i.e., level 0). The routine makeCoarsestLevel() above must be used for that purpose.

The tag buffer indicates the number of cells by which cells selected for refinement will be buffered before new finer level boxes are constructed. The buffer is important to keep phenomena of interest on refined regions of the mesh until adaptive regridding occurs next. Thus, the buffer size should take into account how the simulation may evolve before regridding occurs (e.g., number of timesteps taken).

Important note: If assertion checking is activated, several checks are applied to the function arguments. If any check is violated, an unrecoverable assertion will result. In particular, the hierarchy pointer must be non-NULL and the given level number must match that of the finest level currently residing in the hierarchy. Also, the the tag buffer must be positive.

Parameters
multiblockMultiblock patch hierarchy on which level is created
level_timeSimulation time at which this level is created
initial_timeBoolean flag that should be true only if level_time is the initial time of the simulation
tag_bufferNumber of cells to buffer cells tagged for refinement
regrid_start_timeTime of the previous regrid

Implements SAMRAI::mesh::BaseGriddingAlgorithm< DIM >.

◆ regridAllFinerLevels()

template<int DIM>
virtual void SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::regridAllFinerLevels ( tbox::Pointer< hier::BasePatchHierarchy< DIM > >  multiblock,
const int  level_number,
const double  regrid_time,
const tbox::Array< int > &  tag_buffer,
tbox::Array< double regrid_start_time = tbox::Arraydouble >(),
const bool  level_is_coarsest_to_sync = true 
)
virtual

This routine attempts to reconfigure the patches on each level in an AMR patch hierarchy which is finer than the specified level. The given level number is that of the coarsest level on which cells will be will be selected for refinement. In other words, that level is the finest level that will not be subject to a change in its patch configuration during the regridding process. Generally, this routine should be used to alter a pre-existing AMR patch hierarchy based on the need to adapt the computational mesh around some phenomenon of interest. The routine makeFinerLevel() above should be used to construct an initial hierarchy configuration or to add more than one new level into the hierarchy. Also, this routine will not reconfigure the patches on level 0 (i.e., the coarsest in any hierarchy). The routine makeCoarsestLevel() above is provided for that purpose.

Note that the current algorithm permits at most one new finest level to be added to the hierarchy with each invocation of the regridding process. This constraint, though seemingly restrictive makes the process of maintaining properly nested levels much easier.

The tag buffer array indicates the number of cells by which cells selected for refinement on a level will be buffered before new finer level boxes are constructed. The buffer is important to keep phenomena of interest on refined regions of the mesh until adaptive regridding occurs next. Thus, the buffer size should take into account how the simulation may evolve before regridding occurs (e.g., number of timesteps taken on each level).

The boolean argument level_is_coarsest_to_sync is used for regridding in time-dependent problems. When true, it indicates that the specified level is the coarsest level to synchronize at the current regrid time before this regridding method is called. This is a pretty idiosyncratic argument but allows some flexibility in the way memory is managed during time-dependent regridding operations.

Important note: If assertion checking is activated, several checks are applied to the functions arguments. If any check is violated, an unrecoverable assertion will result. In particular, the hierarchy pointer must be non-NULL and the given level number must match that of of some level in the hierarchy. Also, the tag buffer array must contain a positive value for each level in the hierarchy.

Parameters
multiblockMultiblock patch hierarchy where the levels exist
level_numberLevel number of a coarse level for which all finer levels will be regridded
regrid_timeSimulation time when regridding occurs
tag_bufferArray that stores the tag buffer around tagged cells that will be applied at each level.
regrid_start_timeArray that stores the time that each level of the hierarchy was last regridded
level_is_coarsest_to_syncSee comments above

Implements SAMRAI::mesh::BaseGriddingAlgorithm< DIM >.

◆ errorEstimationUsesTimeIntegration()

template<int DIM>
virtual bool SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::errorEstimationUsesTimeIntegration ( ) const
virtual

◆ getErrorCoarsenRatio()

template<int DIM>
virtual int SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::getErrorCoarsenRatio ( ) const
virtual

This is needed for cases where an error estimation schem uses time integration (e.g. Richardson extrapolation) to determine how many time levels to maintain to properly apply the estimtion scheme. In general, an even refine ratio (e.g. 2, 4, 8) will maintain two time levels, while an odd refine ratio (e.g. 3) will maintain three.

Implements SAMRAI::mesh::BaseGriddingAlgorithm< DIM >.

◆ levelCanBeRefined()

template<int DIM>
virtual bool SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::levelCanBeRefined ( const int  level_number) const
virtual

◆ getTagAndInitializeStrategy()

template<int DIM>
virtual tbox::Pointer< mesh::TagAndInitializeStrategy<DIM> > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::getTagAndInitializeStrategy ( ) const
virtual

◆ getMaxLevels()

template<int DIM>
virtual int SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::getMaxLevels ( ) const
virtual

◆ getRatioToCoarserLevel()

template<int DIM>
virtual const hier::IntVector<DIM>& SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::getRatioToCoarserLevel ( int  level_number) const
virtual

◆ getEfficiencyTolerance()

template<int DIM>
virtual double SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::getEfficiencyTolerance ( int  level_number) const
virtual

◆ getCombineEfficiency()

template<int DIM>
virtual double SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::getCombineEfficiency ( int  level_number) const
virtual

◆ getProperNestingBuffer()

template<int DIM>
virtual int SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::getProperNestingBuffer ( int  level_number) const
virtual

◆ getSmallestPatchSize()

template<int DIM>
virtual const hier::IntVector<DIM>& SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::getSmallestPatchSize ( const int  level_number) const
virtual

◆ getLargestPatchSize()

template<int DIM>
virtual const hier::IntVector<DIM>& SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::getLargestPatchSize ( const int  level_number) const
virtual

◆ putToDatabase()

template<int DIM>
virtual void SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::putToDatabase ( tbox::Pointer< tbox::Database db)
virtual

When assertion checking is active, the database pointer must be non-null.

Implements SAMRAI::mesh::BaseGriddingAlgorithm< DIM >.

◆ getFromInput()

template<int DIM>
void SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::getFromInput ( tbox::Pointer< tbox::Database db,
bool  is_from_restart 
)
private

When assertion checking is active, the database pointer must be non-null.

Parameters
dbinput database
is_from_restartset to true if simulation needs to be initialized from restart

◆ getFromRestart()

template<int DIM>
void SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::getFromRestart ( )
private

Read object state from the restart file and initialize class data members. The database from which the restart data is read is determined by the object_name specified in the constructor.

Unrecoverable Errors:

-The database corresponding to object_name is not found in the restart file.

-The class version number and restart version number do not match.

◆ findProperNestingBoxes()

template<int DIM>
void SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::findProperNestingBoxes ( const tbox::Pointer< hier::PatchHierarchy< DIM > >  hierarchy,
const int  level_number,
const int  block_number,
hier::BoxList< DIM > &  complement 
)
private

Recursively determine proper nesting boxes for specified level and each finer level in the hierarchy. The proper nesting boxes for a level are an array of boxes whose union represents the allowable extent of the next finer level within the interior of the level.

Parameters
hierarchyPatch hierarchy where the level exists
level_numberLevel to be nested
block_numberBlock where this level exists
complementOutput box list containing nesting boxes

◆ setTagsOnLevel()

template<int DIM>
void SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::setTagsOnLevel ( const int  tag_value,
const tbox::Pointer< hier::PatchLevel< DIM > >  level,
const int  index,
const hier::BoxArray< DIM > &  boxes,
const bool  interior_only = true 
) const
private

Set integer tags to specified value on intersection between patch level and given box array. The index value corresponds to the patch descriptor entry of the cell-centered integer tag array. The boolean flag indicates whether tags are to be set on the regions corresponding to the interior of the level only, if the tag arrays contain ghosts.

Parameters
tag_valueValue of the tags that will be set
levelLevel on which tags will be set
indexPatch data index corresponding to data that stores tags
boxesTags will be set on all cells contained in the intersection of these boxes and the patch level
interior_onlyIf true, tags will be set only on the interior of the tag patch data, else they will be set also on ghost regions.

◆ bufferTagsOnLevel()

template<int DIM>
void SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::bufferTagsOnLevel ( const int  tag_value,
const tbox::Pointer< hier::MultiblockPatchLevel< DIM > >  level,
const int  buffer_size 
) const
private
Parameters
tag_valueIf a cell has been tagged with this value, a buffer of surrounding cells will also be tagged with this value.
levelMultiblock patch level on which tags will be buffered.
buffer_sizeSize of buffer to be created.

◆ findRefinementBoxes()

template<int DIM>
void SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::findRefinementBoxes ( hier::BoxArray< DIM > &  fine_boxes,
hier::ProcessorMapping mapping,
const tbox::Pointer< hier::PatchHierarchy< DIM > >  hierarchy,
const int  coarse_level_number,
const hier::BoxList< DIM > &  nesting_boxes 
) const
private

Given a hierarchy and a level number, determine an array of boxes from which a refinement of the level may be constructed. It is assumed that the integer tags that identify cells for refinement have been set on the level before this routine is called. Note that this routine also returns the processor mapping for the fine boxes. The processor mapping indicates the assignments of the new patches to processors when the new fine patch level is constructed. The processor mapping and final box array are set by the mesh::LoadBalanceStrategy<DIM> data member.

Parameters
fine_boxesThe boxes on which a new fine level will be made
mappingMapping of new patches to processors
hierarchyPatch hierarchy being operated on
coarse_level_numberBoxes are being created for level finer than this level.
nesting_boxesFine boxes will be nested within these boxes

◆ regridFinerLevel()

template<int DIM>
void SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::regridFinerLevel ( tbox::Pointer< hier::MultiblockPatchHierarchy< DIM > >  hierarchy,
const int  level_number,
const double  regrid_time,
const int  finest_level_not_regridded,
const bool  level_is_coarsest_to_sync,
const tbox::Array< int > &  tag_buffer,
const tbox::Array< double > &  regrid_start_time = NULL 
)
private

Recursively regrid the specified hierarchy level and all finer levels in the hierarchy. This private member function is invoked by the regridAllFinerLevels() routine.

Parameters
hierarchyHierarchy containing the levels
level_numberLevel number to be regridded
regrid_timeSimulation time when called
finest_level_not_regriddedLevel number of the finest level that has not yet been regridded
level_is_coarsest_to_syncSet to true if the level specified by level_number is the coarsest level that needs to be synchronized
tag_bufferArray that stored the size of tag buffers for each level
regrid_start_timeArray that stores the times of the last time each level was regridded

◆ getGriddingParameters()

template<int DIM>
virtual void SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::getGriddingParameters ( hier::IntVector< DIM > &  smallest_patch,
hier::IntVector< DIM > &  smallest_box_to_refine,
hier::IntVector< DIM > &  largest_patch,
hier::IntVector< DIM > &  extend_ghosts,
const tbox::Pointer< hier::PatchHierarchy< DIM > >  hierarchy,
const int  level_number 
) const
privatevirtual

Set patch size and ghost cell information needed to create new refinement levels. The maximum number of ghost cells needed in any variable is used to compute the smallest patch size allowed and the extent to which patches may be extended to touch the physical boundary. This avoids problems in setting ghost cell data that may occur when ghost cell regions intersect the physical boundary in strange ways.

This routine sets the smallest and largest patch sizes for the specified level, the smallest box to refine on the next coarser level, and the number of cells that a patch may be extended to the boundary if it sufficiently close to the boundary (extend_ghosts).

Parameters
smallest_patchSmallest size allowed for a patch
smallest_box_to_refineSmallest box that can be refined on the next coarser level and still fall within the smallest and largest patch parameters.
largest_patchLargest size allowed for a patch
extend_ghostsIf distance between a patch and a domain boundary is less than this parameter, the patch will be extended to the boundary
hierarchyPatch hierarchy containing patch levels
level_numberNumber of coarser level from which a finer level is being computed

◆ operator=()

template<int DIM>
void SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::operator= ( const MultiblockGriddingAlgorithm< DIM > &  )
private

Member Data Documentation

◆ s_instance_counter

template<int DIM>
int SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::s_instance_counter
staticprivate

◆ s_tag_indx

template<int DIM>
int SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::s_tag_indx
staticprivate

◆ s_buf_tag_indx

template<int DIM>
int SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::s_buf_tag_indx
staticprivate

◆ s_buf_tag_src_indx

template<int DIM>
int SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::s_buf_tag_src_indx
staticprivate

◆ d_object_name

template<int DIM>
std::string SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_object_name
private

◆ d_registered_for_restart

template<int DIM>
bool SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_registered_for_restart
private

◆ d_max_levels

template<int DIM>
int SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_max_levels
private

◆ d_ratio_to_coarser

template<int DIM>
tbox::Array<hier::IntVector<DIM> > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_ratio_to_coarser
private

◆ d_tag_init_strategy

template<int DIM>
tbox::Pointer< mesh::TagAndInitializeStrategy<DIM> > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_tag_init_strategy
private

◆ d_box_generator

template<int DIM>
tbox::Pointer< mesh::BoxGeneratorStrategy<DIM> > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_box_generator
private

◆ d_load_balancer

template<int DIM>
tbox::Pointer< mesh::LoadBalanceStrategy<DIM> > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_load_balancer
private

◆ d_mb_tagger_strategy

template<int DIM>
MultiblockGriddingTagger<DIM>* SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_mb_tagger_strategy
private

◆ d_internal_tagger_strategy

template<int DIM>
bool SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_internal_tagger_strategy
private

◆ d_tag

template<int DIM>
tbox::Pointer< pdat::CellVariable<DIM,int> > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_tag
private

◆ d_buf_tag

template<int DIM>
tbox::Pointer< pdat::CellVariable<DIM,int> > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_buf_tag
private

◆ d_buf_src_tag

template<int DIM>
tbox::Pointer< pdat::CellVariable<DIM,int> > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_buf_src_tag
private

◆ d_tag_indx

template<int DIM>
int SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_tag_indx
private

◆ d_buf_tag_indx

template<int DIM>
int SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_buf_tag_indx
private

◆ d_buf_tag_src_indx

template<int DIM>
int SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_buf_tag_src_indx
private

◆ d_smallest_patch_size

template<int DIM>
tbox::Array<hier::IntVector<DIM> > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_smallest_patch_size
private

◆ d_largest_patch_size

template<int DIM>
tbox::Array<hier::IntVector<DIM> > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_largest_patch_size
private

◆ d_write_dumped_level_boxes

template<int DIM>
bool SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_write_dumped_level_boxes
private

◆ d_read_dumped_level_boxes

template<int DIM>
bool SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_read_dumped_level_boxes
private

◆ d_regrid_boxes_filename

template<int DIM>
std::string SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_regrid_boxes_filename
private

◆ d_regrid_box_counter

template<int DIM>
tbox::Array< tbox::Array<int> > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_regrid_box_counter
private

◆ d_regrid_box_utility

template<int DIM>
hier::BoxIOUtility<DIM>* SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_regrid_box_utility
private

◆ d_proper_nesting_buffer

template<int DIM>
tbox::Array<int> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_proper_nesting_buffer
private

◆ d_allow_patches_smaller_than_ghostwidth

template<int DIM>
bool SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_allow_patches_smaller_than_ghostwidth
private

◆ d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps

template<int DIM>
bool SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps
private

◆ d_efficiency_tolerance

template<int DIM>
tbox::Array<double> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_efficiency_tolerance
private

◆ d_combine_efficiency

template<int DIM>
tbox::Array<double> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_combine_efficiency
private

◆ d_bdry_fill_tags

template<int DIM>
tbox::Pointer< xfer::MultiblockRefineAlgorithm<DIM> > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_bdry_fill_tags
private

◆ d_bdry_sched_tags

template<int DIM>
tbox::Array< tbox::Pointer< xfer::MultiblockRefineSchedule<DIM> > > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_bdry_sched_tags
private

◆ d_proper_nesting_boxes

template<int DIM>
tbox::Array< tbox::Array<hier::BoxList<DIM> > > SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_proper_nesting_boxes
private

◆ d_true_tag

template<int DIM>
int SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_true_tag
private

◆ d_false_tag

template<int DIM>
int SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::d_false_tag
private

◆ t_find_proper_nesting

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_find_proper_nesting
private

◆ t_intersect_boxes_find_refinement

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_intersect_boxes_find_refinement
private

◆ t_load_balance_boxes

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_load_balance_boxes
private

◆ t_bdry_fill_tags_create

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_bdry_fill_tags_create
private

◆ t_make_coarsest

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_make_coarsest
private

◆ t_regrid_all_finer

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_regrid_all_finer
private

◆ t_remove_intersections_regrid_all

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_remove_intersections_regrid_all
private

◆ t_make_finer

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_make_finer
private

◆ t_remove_intersections_make_finer

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_remove_intersections_make_finer
private

◆ t_set_tags

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_set_tags
private

◆ t_buffer_tags

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_buffer_tags
private

◆ t_bdry_fill_tags_comm

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_bdry_fill_tags_comm
private

◆ t_find_refinement

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_find_refinement
private

◆ t_find_boxes_containing_tags

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_find_boxes_containing_tags
private

◆ t_remove_intersections_find_proper

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_remove_intersections_find_proper
private

◆ t_intersect_boxes_find_proper

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::MultiblockGriddingAlgorithm< DIM >::t_intersect_boxes_find_proper
private

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