Public Methods |
| PAmrNS () |
| default constructor
|
| PAmrNS (const ProblemDomain &a_vectDomain, const Vector< int > &a_vectRefRatio, const RealVect &a_domainLength, int a_maxLevel) |
| full constructor -- calls matching define function
|
| ~PAmrNS () |
| destructor.
|
void | define (const ProblemDomain &a_baseDomain, const Vector< int > &a_vectRefRatio, const RealVect &a_domainLength, int a_maxLevel) |
| full define function
|
void | setupForFixedHierarchyRun (Vector< Vector< Box > > &a_vectBoxes) |
| set up grids, etc for fixed-hiearchy run
|
void | setupForAmrRun () |
| set up grids, etc for AMR run
|
void | setupForRestart (const string &a_restartFile) |
| set up for restart
|
void | setupForRestart (const HDF5Handle &a_restartFile) |
| set up for restart
|
Real | doRun (Real a_maxTime, int a_maxStep) |
| advance solution. returns time of final solution
|
void | conclude () |
| write final checkpoint and plot files, tells final stats, etc.
|
void | checkpointInterval (int a_checkpointInterval) |
| related I/O stuff
|
void | plotInterval (int a_plotInterval) |
void | checkpointPrefix (const string &a_prefix) |
void | plotPrefix (const string &a_prefix) |
void | maxGridSize (int a_maxGridSize) |
void | maxBaseGridSize (int a_maxBaseGridSize) |
void | fillRatio (Real a_fillRatio) |
void | blockFactor (int a_blockFactor) |
void | regridInterval (int a_regridInterval) |
void | maxDtGrow (Real &a_maxDtGrow) |
void | fixedDt (Real a_dt) |
void | CFL (Real a_cfl) |
| set CFL number
|
void | particleCFL (Real a_particle_cfl) |
| set CFL number for computing timestep based on particles
|
void | refinementThreshold (Real a_refine_threshold) |
| set refinement threshold
|
void | limitSolverCoarsening (bool a_limitSolverCoarsening) |
| set solver parameter
|
void | verbosity (int a_verbosity) |
| set verbosity level
|
int | finestLevel () const |
| what is the finest defined level? (may be less than maxLevel)
|
int | maxLevel () const |
| what is the finest allowable level?
|
bool | isEmpty (int a_level) const |
| is a_level an empty level?
|
Real | Dx (int a_level) const |
Real | Nu () const |
| viscous coefficient
|
void | setPhysBC (const PhysBCUtil &a_BC) |
| sets physical BC object
|
bool | isDefined () const |
| has this object been defined?
|
Protected Methods |
void | advance (Real a_dt) |
| advance by one timestep (returns what, if anything?)
|
void | postTimeStep () |
| things to do after a timestep
|
void | tagCells (Vector< IntVectSet > &a_tags) |
| create tags
|
void | tagCellsLevel (IntVectSet &a_tags, int a_level) |
| create tags
|
void | tagCellsInit (Vector< IntVectSet > &a_tags) |
| create tags at initialization
|
void | regrid () |
| regrid
|
void | postRegrid () |
| perform any post-regridding ops
|
void | initialGrid (const Vector< Vector< Box > > &a_new_grids, int a_baseLevel, bool a_clearStorage=false) |
| initialize grids -- does load balancing as well
|
void | initialGrid (const Vector< DisjointBoxLayout > &a_new_grids, const Vector< DisjointBoxLayout > &a_new_particle_grids, int a_baseLevel, bool a_clearStorage=false) |
| initialize grids -- no need to load-balance.
|
void | initialData () |
| initialize data
|
void | postInitialize () |
| things do do after initialization
|
Real | computeDt () |
| compute dt
|
Real | computeInitialDt () |
| compute dt with initial data
|
void | computeVorticity (LevelData< FArrayBox > &a_vorticity, int a_level) const |
| compute vorticity on level a_level
|
void | computeKineticEnergy (LevelData< FArrayBox > &a_energy, int a_level) const |
| compute kinetic energy on a_level (only on interior cells)
|
Real | particleKineticEnergy () const |
| returns kinetic energy of all the particles in valid cells on all levels
|
void | dumpParticlesASCII (std::ostream &os) const |
| dumps ASCII list of particles
|
void | dumpLoadBalanceInfo () const |
| dumps load balance stats
|
LevelData< FArrayBox > & | newVel (int a_level) |
const LevelData< FArrayBox > & | newVel (int a_level) const |
LevelData< FArrayBox > & | oldVel (int a_level) |
const LevelData< FArrayBox > & | oldVel (int a_level) const |
void | velocity (LevelData< FArrayBox > &a_vel, Real a_time, int a_level) const |
| returns velocity at time t
|
LevelData< BinFab< DragParticle > > & | particles (int a_level) |
| returns particles
|
const LevelData< BinFab< DragParticle > > & | particles (int a_level) const |
| returns particles (const version)
|
int | numParticles (int a_level) const |
| number of particles on this AMR level
|
LevelData< FArrayBox > & | newScal (const int a_comp, int a_level) |
const LevelData< FArrayBox > & | newScal (const int a_comp, int a_level) const |
LevelData< FArrayBox > & | oldScal (const int a_comp, int a_level) |
const LevelData< FArrayBox > & | oldScal (const int a_comp, int a_level) const |
void | scalars (LevelData< FArrayBox > &a_scalars, const Real a_time, const int a_comp, int a_level) const |
| returns scalars at time t
|
PhysBCUtil * | getPhysBCPtr () const |
| gets physical BC object
|
void | loadBalance (Vector< DisjointBoxLayout > &a_vectGrids, Vector< DisjointBoxLayout > &a_vectParticleGrids, const Vector< Vector< Box > > &a_vectBoxes, int a_lbase) |
void | setup () |
| set up the AMR hierarchy, etc for a_vectGrids.
|
void | regrid (const Vector< Vector< Box > > &a_new_grids) |
| regrid once new boxes have been generated
|
void | defineParticles (List< DragParticle > &a_particles) const |
| define particle list for entire domain
|
void | readParameters () |
| read parameters from parmParse database
|
void | finestLevel (int a_finest_level) |
| set whether this is the finest level or not
|
void | swapOldAndNewStates () |
| move new-time state into old-time state -- also advances time by dt
|
void | resetStates (const Real a_time) |
| exchange old and new states, resets time to a_time
|
void | computeAdvectionVelocities (Vector< LevelData< FluxBox > * > &a_adv_vel, Vector< LevelData< FArrayBox > * > &a_phi, Vector< LevelData< FArrayBox > * > &a_dragForce) |
| compute advection velocities
|
void | predictVelocities (Vector< LevelData< FArrayBox > * > &a_uDelU, Vector< LevelData< FluxBox > * > &a_advVel, Vector< LevelData< FArrayBox > * > &a_phi, Vector< LevelData< FArrayBox > * > &a_dragForce) |
void | computeUStar (Vector< LevelData< FArrayBox > * > &a_uStar, Vector< LevelData< FArrayBox > * > &a_dragForce, Vector< LevelData< FArrayBox > * > &a_Pi) |
void | updateParticlePositions (Vector< LevelData< FArrayBox > * > &a_newDrag, Vector< LevelData< BinFab< DragParticle > > * > &a_particles, const Vector< LevelData< FArrayBox > * > &a_fluidVel, bool a_completeUpdate) |
| move particles and compute new-time drag forcing
|
void | updateParticleForces (Vector< LevelData< BinFab< DragParticle > > * > &a_particles) |
| update particle forces
|
void | interpVelToParticles (Vector< LevelData< BinFab< DragParticle > > * > &a_particles, const Vector< LevelData< FArrayBox > * > &a_velocity) |
| update particle velocities by interpolating a_vel to particles
|
void | advectScalar (Vector< LevelData< FArrayBox > * > &a_new_scal, Vector< LevelData< FArrayBox > * > &a_old_scal, Vector< LevelData< FluxBox > * > &a_adv_vel, OldPhysIBC *a_scalIBC, Real a_dt) |
| do scalar advection -- assumes all BC's already done
|
void | advectDiffuseScalar (Vector< LevelData< FArrayBox > * > &a_new_scal, Vector< LevelData< FArrayBox > * > &a_old_scal, Vector< LevelData< FluxBox > * > &a_adv_vel, const Real &a_diffusive_coeff, DomainGhostBC &a_scalPhysBC, OldPhysIBC *a_scalIBC, Real a_dt) |
| advect/diffuse scalar -- assumes all BC's already done?
|
void | initializePressure () |
| manages pressure initialization after init or regrid
|
void | computeLapVel (Vector< LevelData< FArrayBox > * > &a_lapVel, Vector< LevelData< FArrayBox > * > &a_vel) |
| compute Laplacian(velocity)
|
void | computeLapScal (Vector< LevelData< FArrayBox > * > &a_lapScal, Vector< LevelData< FArrayBox > * > &a_scal, DomainGhostBC &a_physBC) |
| compute Laplacian(scalars)
|
void | fillVelocity (Vector< LevelData< FArrayBox > * > &a_vel, Real a_time) |
| fill grown velocity field using piecewise-constant interp
|
void | fillVelocity (Vector< LevelData< FArrayBox > * > &a_vel, Real a_time, int vel_comp, int dest_comp, int num_comp) |
| fill grown velocity field using piecewise-constant interp
|
void | fillScalars (Vector< LevelData< FArrayBox > * > &a_scal, Real a_time, const int a_comp) const |
| fill interior and boundary cells (assume a_scal already sized)
|
int | numPlotComps () const |
| number of components in plotfiles
|
void | getPlotDataNames (Vector< string > &a_vectNames) |
| names of plot data components
|
void | getPlotData (Vector< LevelData< FArrayBox > * > &a_plot_data) |
| stuff plotfile data -- not const because of ghost cell issues
|
void | fillCheckpointData (Vector< LevelData< FArrayBox > * > &a_vectData, Vector< string > &a_checkDataNames) |
| allocate and stuff cell-centered checkpoint data.
|
void | setDefaultValues () |
| set default values for parameters at initialization
|
Protected Attributes |
Vector< int > | m_vectRefRatio |
| refinement ratios
|
Vector< ProblemDomain > | m_vectDomain |
| problem domains
|
Vector< Real > | m_vectDx |
| grid spacings
|
Vector< DisjointBoxLayout > | m_vectGrids |
| grid hierarchy
|
Vector< DisjointBoxLayout > | m_vectParticleGrids |
| grid hierarchy for particles
|
Vector< Vector< Box > > | m_vectBoxes |
| need to save boxes?
|
int | m_maxLevel |
| maximum allowable level
|
int | m_finestLevel |
| finest extant level
|
int | m_regrid_interval |
| how many timesteps between regridding
|
int | m_block_factor |
| blocking factor
|
Real | m_fill_ratio |
| grid effiency for meshrefine
|
int | m_nesting_radius |
| proper nesting radius
|
int | m_max_box_size |
| max box size
|
int | m_max_base_box_size |
| max box size on level 0 (default is same as max_box_size)
|
Real | m_time |
int | m_cur_step |
Real | m_dt |
Vector< LevelData< FArrayBox > * > | m_vectOldVel |
| velocity vector at old time
|
Vector< LevelData< FArrayBox > * > | m_vectNewVel |
| velocity vector at new time
|
Vector< LevelData< FArrayBox > * > | m_vectPi |
| pressure from projection
|
Vector< LevelData< BinFab<
DragParticle > > * > | m_vectParticles |
| particles
|
Vector< Vector< LevelData<
FArrayBox > * > > | m_vectOldScal |
| scalars at old time
|
Vector< Vector< LevelData<
FArrayBox > * > > | m_vectNewScal |
| scalars at new time
|
int | m_num_vel_comps |
| number of components of m_state (vel comps + lambda)
|
int | m_num_scal_comps |
| number of scalars
|
int | m_max_scal_comps |
| maximum possible number of scalar components
|
Vector< Real > | m_scal_coeffs |
| diffusion coefficients for scalar advection-diffusion
|
RealVect | m_domLength |
| size of physical domain
|
Real | m_init_shrink |
| factor to shrink initial timestep
|
Real | m_max_dt |
| maximum allowable timestep
|
Real | m_min_dt |
| minimum allowable timestep
|
Real | m_prescribedDt |
Real | m_max_dt_grow |
int | m_verbosity |
| how verbose to make output?
|
bool | m_project_initial_vel |
| should we project initial velocity field (default is yes)
|
bool | m_update_velocity |
| if this is false, velocity field is not updated... (useful for debugging)
|
bool | m_initialize_pressures |
| should we initialize pressures after grid generation & regridding?
|
int | m_num_init_passes |
| number of times to iterate when initializing pressures
|
bool | m_set_bogus_values |
| debugging option -- initially set arrays to m_bogus_value
|
Real | m_bogus_value |
| debugging option -- value to which arrays are initially set
|
bool | m_tag_vorticity |
| tag on vorticity?
|
Real | m_vort_factor |
| factor for tagging -- tag if vorticity greater than factor*max_vort
|
bool | m_tag_particles |
| tag on particles?
|
int | m_tags_grow |
| amount by which to grow tagged regions before calling meshrefine
|
int | m_viscous_solver_type |
| viscous solver type: 0 = backwards euler, 1=Crank-Nicolson, 2=TGA
|
Real | m_viscous_solver_tol |
| viscous solver tolerance (defaults to 1e-7)
|
int | m_viscous_num_smooth_up |
| multigrid parameter for viscous solves
|
int | m_viscous_num_smooth_down |
| multigrid parameter for viscous solves
|
bool | m_limitSolverCoarsening |
Real | m_nu |
| viscosity
|
bool | m_doRestart |
| true if we're starting from a restart
|
bool | m_do_particles |
| if true, do particle stuff, if false, don't
|
bool | m_read_particles_from_file |
| read particle info from file?
|
string | m_particle_file |
| file containing particle info
|
Real | m_particle_drag_coeff |
| particle drag coefficient
|
RealVect | m_particle_body_force |
| particle body force (gravity)
|
Real | m_particle_epsilon |
| particle delta function parameter
|
Real | m_spreading_radius |
| spreading radius for particle projector
|
Real | m_correction_radius |
| safety radius for particle projector
|
int | m_particle_grids_buffer |
| amount to grow auxiliary grids for particles
|
bool | m_use_image_particles |
| if true, use image particles in particle projector near phys boundaries
|
int | m_order_vel_interp |
| order of velocity interpolation for particles
|
bool | m_limit_vel_interp |
| if order_vel_interp > 0, should we limit slopes?
|
int | m_particle_update_type |
| method to update particle positions, velocities
|
bool | m_specifyInitialGrids |
| do we specify initial grids in a gridFile?
|
string | m_initialGridFile |
| gridfile where initial grids are spec'd, if relevant
|
bool | m_init_vel_from_vorticity |
| initialize velocity field from vorticity field
|
Real | m_backgroundVel |
| background velocity (in the z-direction)
|
bool | m_write_particles |
| include particles in plotfile?
|
bool | m_write_divergence |
| include divergence in plotfile?
|
bool | m_write_time_derivatives |
| include du/dt in plotfile?
|
bool | m_write_vorticity |
| include vorticity in plotfile?
|
bool | m_write_scalars |
| include scalars in plotfile?
|
bool | m_write_dScalar_dt |
| include d(scalars)/dt in plotfile?
|
bool | m_write_error |
| include error (if there is an exact solution) in plotfile?
|
bool | m_write_proc_ids |
| include processor distribution visualization in plotfile?
|
bool | m_compute_scal_err |
| compute error and report norms after composite timesteps
|
bool | m_write_initial_solve_rhs |
| dump out initial vorticity->stream function RHS's into plotfiles
|
bool | m_write_grids |
| dump out grid info
|
Real | m_cfl |
| cfl number
|
Real | m_particleCFL |
| cfl number for particle updates
|
Vector< CoarseAverage * > | m_coarse_average |
| averaging from fine to coarse level for velocity
|
Vector< CoarseAverage * > | m_coarse_average_scal |
| averaging from fine to coarse level for scalar
|
AmrProjector | m_projection |
| cell-centered projection object
|
AMRParticleProjector | m_particle_projector |
| particle drag force projector object
|
int | m_particleProjCoarsening |
| parameter for particleProjector
|
Vector< QuadCFInterp * > | m_velCFInterp_ptrs |
| does quadratic coarse-fine interpolation for velocities
|
Vector< PoissonOp * > | m_scalarsPoissonOp_ptrs |
| PoissonOp for advected scalars (for diffusion).
|
Vector< PatchAdvection * > | m_patchGod |
Real | m_refine_threshold |
| refinement threshold for regridding
|
PhysBCUtil * | m_physBCPtr |
| physical BC object
|
int | m_plot_interval |
| interval between plotfiles
|
int | m_check_interval |
| interval between checkpoint files
|
int | m_lastcheck_step |
| bookkeeping stuff last timestep we wrote a checkpoint file
|
int | m_restart_step |
| if we're restarting, the timestep at restart
|
Vector< int > | m_cell_updates |
| counts number of cells updated on each level
|
bool | m_ppInit |
bool | m_isDefined |
std::string | m_plotfile_prefix |
std::string | m_checkpointfile_prefix |
Static Protected Attributes |
const char * | s_vel_names [CH_SPACEDIM] |
| names of components
|
const char * | s_scal_names [NUM_SCAL_TYPES] |
| names of scalars
|