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

Class GriddingAlgorithm<DIM> manages gridding operations in SAMRAI. 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 <ibamr/PhaseChangeHierarchyIntegrator.h>

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

Public Member Functions

 GriddingAlgorithm (const std::string &object_name, tbox::Pointer< tbox::Database > input_db, tbox::Pointer< TagAndInitializeStrategy< DIM > > level_strategy, tbox::Pointer< BoxGeneratorStrategy< DIM > > generator, tbox::Pointer< LoadBalanceStrategy< DIM > > balancer, bool register_for_restart=true)
 
virtual ~GriddingAlgorithm ()
 
virtual void makeCoarsestLevel (tbox::Pointer< hier::BasePatchHierarchy< DIM > > hierarchy, const double level_time, const hier::BoxArray< DIM > &override_boxes=0, const hier::ProcessorMapping &override_mapping=0)
 
virtual void makeFinerLevel (tbox::Pointer< hier::BasePatchHierarchy< DIM > > hierarchy, const double level_time, const bool initial_time, const int tag_buffer, const double regrid_start_time=0.)
 
virtual void regridAllFinerLevels (tbox::Pointer< hier::BasePatchHierarchy< DIM > > hierarchy, 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)
 
virtual bool errorEstimationUsesTimeIntegration () const
 
virtual int getErrorCoarsenRatio () const
 
virtual bool levelCanBeRefined (const int level_number) const
 
virtual tbox::Pointer< TagAndInitializeStrategy< DIM > > getTagAndInitializeStrategy () const
 
virtual tbox::Pointer< LoadBalanceStrategy< DIM > > getLoadBalanceStrategy () const
 
virtual int getMaxLevels () const
 
virtual const hier::IntVector< DIM > & getRatioToCoarserLevel (const int level_number) const
 
virtual double getEfficiencyTolerance (const int level_number) const
 
virtual double getCombineEfficiency (const int level_number) const
 
virtual int getProperNestingBuffer (const int level_number) const
 
virtual const hier::IntVector< DIM > & getSmallestPatchSize (const int level_number) const
 
virtual const hier::IntVector< DIM > & getLargestPatchSize (const int level_number) const
 
virtual void printClassData (std::ostream &os) const
 
virtual void putToDatabase (tbox::Pointer< tbox::Database > db)
 

Private Member Functions

void getFromInput (tbox::Pointer< tbox::Database > db, bool is_from_restart)
 
void getFromRestart ()
 
void regridFinerLevel (tbox::Pointer< hier::PatchHierarchy< 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)
 
void findProperNestingData (const tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy, const int base_ln)
 
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
 
void bufferTagsOnLevel (const int tag_value, const tbox::Pointer< hier::PatchLevel< DIM > > level, const int buffer_size) const
 
void extendTagsToBoundary (const int tag_value, const tbox::Pointer< hier::PatchLevel< DIM > > level, const tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy) const
 
void readLevelBoxes (hier::BoxArray< DIM > &new_level_boxes, hier::ProcessorMapping &mapping, const tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy, const int level_number, const double regrid_time, bool &remove_old_fine_level)
 
void findRefinementBoxes (hier::BoxArray< DIM > &fine_boxes, hier::ProcessorMapping &mapping, const tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy, const int coarse_level_number) const
 
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 bool for_building_finer) const
 
void checkNonrefinedTags (const tbox::Pointer< hier::PatchLevel< DIM > > &level, const hier::BoxTree< DIM > &proper_nesting_complement)
 Check for user tags that violate proper nesting and will not be refined. More...
 
void checkOverlappingPatches (const tbox::Pointer< hier::PatchLevel< DIM > > &level)
 Check for overlapping patches within the level. More...
 
 GriddingAlgorithm (const GriddingAlgorithm< DIM > &)
 
void operator= (const GriddingAlgorithm< DIM > &)
 

Static Private Member Functions

static int qsortBoxCompare (const void *v, const void *w)
 

Private Attributes

std::string d_object_name
 
bool d_registered_for_restart
 
tbox::Pointer< TagAndInitializeStrategy< DIM > > d_tag_init_strategy
 
tbox::Pointer< BoxGeneratorStrategy< DIM > > d_box_generator
 
tbox::Pointer< LoadBalanceStrategy< DIM > > d_load_balancer
 
tbox::Pointer< pdat::CellVariable< DIM, int > > d_tag
 
tbox::Pointer< pdat::CellVariable< DIM, int > > d_buf_tag
 
int d_tag_indx
 
int d_buf_tag_indx
 
tbox::Pointer< xfer::RefineAlgorithm< DIM > > d_bdry_fill_tags
 
tbox::Array< tbox::Pointer< xfer::RefineSchedule< DIM > > > d_bdry_sched_tags
 
int d_true_tag
 
int d_false_tag
 
tbox::Array< hier::BoxList< DIM > > d_proper_nesting_boxes
 
tbox::Array< tbox::Pointer< hier::BoxTree< DIM > > > d_proper_nesting_complement
 
int d_max_levels
 
tbox::Array< hier::IntVector< DIM > > d_ratio_to_coarser
 
tbox::Array< doubled_efficiency_tolerance
 
tbox::Array< doubled_combine_efficiency
 
tbox::Array< hier::IntVector< DIM > > d_smallest_patch_size
 
tbox::Array< hier::IntVector< DIM > > d_largest_patch_size
 
tbox::Array< intd_proper_nesting_buffer
 
bool d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps
 
bool d_allow_patches_smaller_than_ghostwidth
 
bool d_barrier_before_clustering
 
bool d_sort_boxes_after_clustering
 
bool d_coalesce_boxes
 
bool d_write_dumped_level_boxes
 
bool d_read_dumped_level_boxes
 
std::string d_regrid_boxes_filename
 
hier::BoxIOUtility< DIM > * d_regrid_box_utility
 
tbox::Array< intd_regrid_box_counter
 
bool d_extend_tags_to_bdry
 
char d_check_nonrefined_tags
 How to resolve user tags that violate nesting requirements. More...
 
char d_check_overlapping_patches
 Whether or not to check for overlapping patches on a level. More...
 
tbox::Pointer< tbox::Timert_find_domain_complement
 
tbox::Pointer< tbox::Timert_intersect_boxes_find_refinement
 
tbox::Pointer< tbox::Timert_load_balance
 
tbox::Pointer< tbox::Timert_bdry_fill_tags_create
 
tbox::Pointer< tbox::Timert_make_coarsest
 
tbox::Pointer< tbox::Timert_make_finer
 
tbox::Pointer< tbox::Timert_remove_intersections_make_finer
 
tbox::Pointer< tbox::Timert_regrid_all_finer
 
tbox::Pointer< tbox::Timert_remove_intersections_regrid_all
 
tbox::Pointer< tbox::Timert_remove_intersections_find_proper
 
tbox::Pointer< tbox::Timert_intersect_boxes_find_proper
 
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_find_nesting_restriction
 
tbox::Pointer< tbox::Timert_apply_nesting_restriction
 
tbox::Pointer< tbox::Timert_coalesce_boxes
 
tbox::Pointer< tbox::Timert_grow_boxes_within_domain
 
tbox::Pointer< tbox::Timert_before_load_balance
 
tbox::Pointer< tbox::Timert_reset_hier
 
tbox::Pointer< tbox::Timert_tag_cells_for_refinement
 
tbox::Pointer< tbox::Timert_box_massage
 
tbox::Pointer< tbox::Timert_enforce_nesting
 
tbox::Pointer< tbox::Timert_extend_to_domain_boundary
 
tbox::Pointer< tbox::Timert_regrid_finer_create
 

Static Private Attributes

static int s_instance_counter
 
static int s_tag_indx
 
static int s_buf_tag_indx
 

Detailed Description

template<int DIM>
class SAMRAI::mesh::GriddingAlgorithm< 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 TagAndInitializeStrategy<DIM>. Operations that cluster tagged cells into a collection of box regions are provided by the BoxGeneratorStrategy<DIM> data member. Routines that load balancing patches on each level are provided by the 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 GriddingAlgorithm<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"
*
*    coalesce_boxes = TRUE
*
* 
See also
mesh::TagAndInitializeStrategy
mesh::LoadBalanceStrategy
mesh::BoxGeneratorStrategy

Constructor & Destructor Documentation

◆ GriddingAlgorithm() [1/2]

template<int DIM>
SAMRAI::mesh::GriddingAlgorithm< DIM >::GriddingAlgorithm ( const std::string &  object_name,
tbox::Pointer< tbox::Database input_db,
tbox::Pointer< TagAndInitializeStrategy< DIM > >  level_strategy,
tbox::Pointer< BoxGeneratorStrategy< DIM > >  generator,
tbox::Pointer< LoadBalanceStrategy< DIM > >  balancer,
bool  register_for_restart = true 
)

The constructor for GriddingAlgorithm<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.

◆ ~GriddingAlgorithm()

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

Virtual destructor for GriddingAlgorithm<DIM>.

◆ GriddingAlgorithm() [2/2]

template<int DIM>
SAMRAI::mesh::GriddingAlgorithm< DIM >::GriddingAlgorithm ( const GriddingAlgorithm< DIM > &  )
private

Member Function Documentation

◆ makeCoarsestLevel()

template<int DIM>
virtual void SAMRAI::mesh::GriddingAlgorithm< DIM >::makeCoarsestLevel ( tbox::Pointer< hier::BasePatchHierarchy< DIM > >  hierarchy,
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 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 are only to be used for a special case where the user wishes to manually specify a box decomposition and load balance for the coarsest level of the hierarchy. The BoxArray argument must be a decomposition of the the coarsest level, and must exactly fill the index space of the physical domain of the hierarchy. The ProcessorMapping must be constructed to map each box in the BoxArray to a processor. The size of the mapping must be equal to the length of the box array, or an assertion failure will result.

Parameters
hierarchyThe hierarchy on which coarse level is constructed.
level_timeSimulation time when level is constructed
override_boxesbox array representing a decomposition of level zero of the hierarchy
override_mappingprocessor mapping that maps each box in the above array to a processor.

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

◆ makeFinerLevel()

template<int DIM>
virtual void SAMRAI::mesh::GriddingAlgorithm< DIM >::makeFinerLevel ( tbox::Pointer< hier::BasePatchHierarchy< DIM > >  hierarchy,
const double  level_time,
const bool  initial_time,
const int  tag_buffer,
const double  regrid_start_time = 0. 
)
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 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 the finest level currently residing in the hierarchy. Also, the the tag buffer must be positive.

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

◆ regridAllFinerLevels()

template<int DIM>
virtual void SAMRAI::mesh::GriddingAlgorithm< DIM >::regridAllFinerLevels ( tbox::Pointer< hier::BasePatchHierarchy< DIM > >  hierarchy,
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 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.

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

◆ errorEstimationUsesTimeIntegration()

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

Return true if error estimation process uses time integration; otherwise, return false.

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

◆ getErrorCoarsenRatio()

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

Return the error coarsen ratio. This is needed for cases where an error estimation scheme 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::GriddingAlgorithm< DIM >::levelCanBeRefined ( const int  level_number) const
virtual

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.

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

◆ getTagAndInitializeStrategy()

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

Return pointer to level gridding strategy data member.

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

◆ getLoadBalanceStrategy()

template<int DIM>
virtual tbox::Pointer< LoadBalanceStrategy<DIM> > SAMRAI::mesh::GriddingAlgorithm< DIM >::getLoadBalanceStrategy ( ) const
virtual

Return pointer to load balance strategy data member.

◆ getMaxLevels()

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

Return maximum number of levels allowed in hierarchy.

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

◆ getRatioToCoarserLevel()

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

Return const reference to ratio between specified level and next coarser.

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

◆ getEfficiencyTolerance()

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

Return efficiency tolerance for clustering tags on level.

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

◆ getCombineEfficiency()

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

Return combine efficiency for clustering tags on level.

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

◆ getProperNestingBuffer()

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

Return proper nesting buffer width for level.

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

◆ getSmallestPatchSize()

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

Return const reference to smallest patch size for level.

◆ getLargestPatchSize()

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

Return const reference to largest patch size for level.

◆ printClassData()

template<int DIM>
virtual void SAMRAI::mesh::GriddingAlgorithm< DIM >::printClassData ( std::ostream &  os) const
virtual

Print out all members of the class instance to given output stream.

◆ putToDatabase()

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

Write object state out to the given database.

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

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

◆ getFromInput()

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

◆ getFromRestart()

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

◆ regridFinerLevel()

template<int DIM>
void SAMRAI::mesh::GriddingAlgorithm< DIM >::regridFinerLevel ( tbox::Pointer< hier::PatchHierarchy< 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

◆ findProperNestingData()

template<int DIM>
void SAMRAI::mesh::GriddingAlgorithm< DIM >::findProperNestingData ( const tbox::Pointer< hier::PatchHierarchy< DIM > >  hierarchy,
const int  base_ln 
)
private

◆ setTagsOnLevel()

template<int DIM>
void SAMRAI::mesh::GriddingAlgorithm< 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

◆ bufferTagsOnLevel()

template<int DIM>
void SAMRAI::mesh::GriddingAlgorithm< DIM >::bufferTagsOnLevel ( const int  tag_value,
const tbox::Pointer< hier::PatchLevel< DIM > >  level,
const int  buffer_size 
) const
private

◆ extendTagsToBoundary()

template<int DIM>
void SAMRAI::mesh::GriddingAlgorithm< DIM >::extendTagsToBoundary ( const int  tag_value,
const tbox::Pointer< hier::PatchLevel< DIM > >  level,
const tbox::Pointer< hier::PatchHierarchy< DIM > >  hierarchy 
) const
private

◆ readLevelBoxes()

template<int DIM>
void SAMRAI::mesh::GriddingAlgorithm< DIM >::readLevelBoxes ( hier::BoxArray< DIM > &  new_level_boxes,
hier::ProcessorMapping mapping,
const tbox::Pointer< hier::PatchHierarchy< DIM > >  hierarchy,
const int  level_number,
const double  regrid_time,
bool remove_old_fine_level 
)
private

◆ findRefinementBoxes()

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

◆ getGriddingParameters()

template<int DIM>
virtual void SAMRAI::mesh::GriddingAlgorithm< 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 bool  for_building_finer 
) const
privatevirtual

◆ checkNonrefinedTags()

template<int DIM>
void SAMRAI::mesh::GriddingAlgorithm< DIM >::checkNonrefinedTags ( const tbox::Pointer< hier::PatchLevel< DIM > > &  level,
const hier::BoxTree< DIM > &  proper_nesting_complement 
)
private

◆ checkOverlappingPatches()

template<int DIM>
void SAMRAI::mesh::GriddingAlgorithm< DIM >::checkOverlappingPatches ( const tbox::Pointer< hier::PatchLevel< DIM > > &  level)
private

◆ qsortBoxCompare()

template<int DIM>
static int SAMRAI::mesh::GriddingAlgorithm< DIM >::qsortBoxCompare ( const void *  v,
const void *  w 
)
staticprivate

◆ operator=()

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

Member Data Documentation

◆ s_instance_counter

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

◆ s_tag_indx

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

◆ s_buf_tag_indx

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

◆ d_object_name

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

◆ d_registered_for_restart

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

◆ d_tag_init_strategy

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

◆ d_box_generator

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

◆ d_load_balancer

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

◆ d_tag

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

◆ d_buf_tag

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

◆ d_tag_indx

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

◆ d_buf_tag_indx

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

◆ d_bdry_fill_tags

template<int DIM>
tbox::Pointer< xfer::RefineAlgorithm<DIM> > SAMRAI::mesh::GriddingAlgorithm< DIM >::d_bdry_fill_tags
private

◆ d_bdry_sched_tags

template<int DIM>
tbox::Array< tbox::Pointer< xfer::RefineSchedule<DIM> > > SAMRAI::mesh::GriddingAlgorithm< DIM >::d_bdry_sched_tags
private

◆ d_true_tag

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

◆ d_false_tag

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

◆ d_proper_nesting_boxes

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

◆ d_proper_nesting_complement

template<int DIM>
tbox::Array< tbox::Pointer< hier::BoxTree<DIM> > > SAMRAI::mesh::GriddingAlgorithm< DIM >::d_proper_nesting_complement
private

◆ d_max_levels

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

◆ d_ratio_to_coarser

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

◆ d_efficiency_tolerance

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

◆ d_combine_efficiency

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

◆ d_smallest_patch_size

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

◆ d_largest_patch_size

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

◆ d_proper_nesting_buffer

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

◆ d_allow_patches_smaller_than_minimum_size_to_prevent_overlaps

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

◆ d_allow_patches_smaller_than_ghostwidth

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

◆ d_barrier_before_clustering

template<int DIM>
bool SAMRAI::mesh::GriddingAlgorithm< DIM >::d_barrier_before_clustering
private

◆ d_sort_boxes_after_clustering

template<int DIM>
bool SAMRAI::mesh::GriddingAlgorithm< DIM >::d_sort_boxes_after_clustering
private

◆ d_coalesce_boxes

template<int DIM>
bool SAMRAI::mesh::GriddingAlgorithm< DIM >::d_coalesce_boxes
private

◆ d_write_dumped_level_boxes

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

◆ d_read_dumped_level_boxes

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

◆ d_regrid_boxes_filename

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

◆ d_regrid_box_utility

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

◆ d_regrid_box_counter

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

◆ d_extend_tags_to_bdry

template<int DIM>
bool SAMRAI::mesh::GriddingAlgorithm< DIM >::d_extend_tags_to_bdry
private

◆ d_check_nonrefined_tags

template<int DIM>
char SAMRAI::mesh::GriddingAlgorithm< DIM >::d_check_nonrefined_tags
private

If a tag violates the nesting requirements, its location in index space will not be refined when creating a finer level. This flag allows the user to determine what to do when this occurs

Values can be:

  • 'i' Ignore (violating tags will be quietly disregarded)
  • 'w' Warn (violating tags will cause a warning and be disregarded)
  • 'e' Error (violating tags will cause an unrecoverable exception)

This defaults to 'w' and set by input parameter "check_nonrefined_tags".

◆ d_check_overlapping_patches

template<int DIM>
char SAMRAI::mesh::GriddingAlgorithm< DIM >::d_check_overlapping_patches
private

This determines whether to check if a new level has any patches that overlap in indes space.

Values can be:

  • 'i' Ignore (overlapping patches will be quietly disregarded)
  • 'w' Warn (overlapping patches will cause a warning and be disregarded)
  • 'e' Error (overlapping patches will cause an unrecoverable exception)

This defaults to 'i' and set by input parameter "check_overlapping_patches".

◆ t_find_domain_complement

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::GriddingAlgorithm< DIM >::t_find_domain_complement
private

◆ t_intersect_boxes_find_refinement

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

◆ t_load_balance

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::GriddingAlgorithm< DIM >::t_load_balance
private

◆ t_bdry_fill_tags_create

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

◆ t_make_coarsest

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

◆ t_make_finer

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

◆ t_remove_intersections_make_finer

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

◆ t_regrid_all_finer

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

◆ t_remove_intersections_regrid_all

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

◆ t_remove_intersections_find_proper

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

◆ t_intersect_boxes_find_proper

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

◆ t_set_tags

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

◆ t_buffer_tags

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

◆ t_bdry_fill_tags_comm

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

◆ t_find_refinement

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

◆ t_find_boxes_containing_tags

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

◆ t_find_nesting_restriction

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::GriddingAlgorithm< DIM >::t_find_nesting_restriction
private

◆ t_apply_nesting_restriction

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::GriddingAlgorithm< DIM >::t_apply_nesting_restriction
private

◆ t_coalesce_boxes

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::GriddingAlgorithm< DIM >::t_coalesce_boxes
private

◆ t_grow_boxes_within_domain

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::GriddingAlgorithm< DIM >::t_grow_boxes_within_domain
private

◆ t_before_load_balance

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::GriddingAlgorithm< DIM >::t_before_load_balance
private

◆ t_reset_hier

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::GriddingAlgorithm< DIM >::t_reset_hier
private

◆ t_tag_cells_for_refinement

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::GriddingAlgorithm< DIM >::t_tag_cells_for_refinement
private

◆ t_box_massage

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::GriddingAlgorithm< DIM >::t_box_massage
private

◆ t_enforce_nesting

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::GriddingAlgorithm< DIM >::t_enforce_nesting
private

◆ t_extend_to_domain_boundary

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::GriddingAlgorithm< DIM >::t_extend_to_domain_boundary
private

◆ t_regrid_finer_create

template<int DIM>
tbox::Pointer<tbox::Timer> SAMRAI::mesh::GriddingAlgorithm< DIM >::t_regrid_finer_create
private

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