IBAMR  IBAMR version 0.19.
Public Member Functions | List of all members
IBTK::LSiloDataWriter Class Reference

Class LSiloDataWriter provides functionality to output Lagrangian data for visualization via the VisIt visualization tool in the Silo data format. More...

#include <ibtk/LSiloDataWriter.h>

Inheritance diagram for IBTK::LSiloDataWriter:
Inheritance graph
[legend]

Public Member Functions

 LSiloDataWriter (std::string object_name, std::string dump_directory_name, bool register_for_restart=true)
 Constructor. More...
 
 ~LSiloDataWriter ()
 Destructor. More...
 

Methods to set the hierarchy and range of levels.

std::string d_object_name
 
bool d_registered_for_restart
 
std::string d_dump_directory_name
 
int d_time_step_number = -1
 
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > d_hierarchy
 
int d_coarsest_ln = 0
 
int d_finest_ln = 0
 
std::vector< intd_nclouds
 
std::vector< std::vector< std::string > > d_cloud_names
 
std::vector< std::vector< int > > d_cloud_nmarks
 
std::vector< std::vector< int > > d_cloud_first_lag_idx
 
std::vector< intd_nblocks
 
std::vector< std::vector< std::string > > d_block_names
 
std::vector< std::vector< SAMRAI::hier::IntVector< NDIM > > > d_block_nelems
 
std::vector< std::vector< SAMRAI::hier::IntVector< NDIM > > > d_block_periodic
 
std::vector< std::vector< int > > d_block_first_lag_idx
 
std::vector< intd_nmbs
 
std::vector< std::vector< std::string > > d_mb_names
 
std::vector< std::vector< int > > d_mb_nblocks
 
std::vector< std::vector< std::vector< SAMRAI::hier::IntVector< NDIM > > > > d_mb_nelems
 
std::vector< std::vector< std::vector< SAMRAI::hier::IntVector< NDIM > > > > d_mb_periodic
 
std::vector< std::vector< std::vector< int > > > d_mb_first_lag_idx
 
std::vector< intd_nucd_meshes
 
std::vector< std::vector< std::string > > d_ucd_mesh_names
 
std::vector< std::vector< std::set< int > > > d_ucd_mesh_vertices
 
std::vector< std::vector< std::multimap< int, std::pair< int, int > > > > d_ucd_mesh_edge_maps
 
std::vector< SAMRAI::tbox::Pointer< LData > > d_coords_data
 
std::vector< intd_nvars
 
std::vector< std::vector< std::string > > d_var_names
 
std::vector< std::vector< int > > d_var_start_depths
 
std::vector< std::vector< int > > d_var_plot_depths
 
std::vector< std::vector< int > > d_var_depths
 
std::vector< std::vector< SAMRAI::tbox::Pointer< LData > > > d_var_data
 
std::vector< AO > d_ao
 
std::vector< boold_build_vec_scatters
 
std::vector< std::map< int, Vec > > d_src_vec
 
std::vector< std::map< int, Vec > > d_dst_vec
 
std::vector< std::map< int, VecScatter > > d_vec_scatter
 
bool d_summary_file_opened = false
 
void setPatchHierarchy (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy)
 Reset the patch hierarchy over which operations occur. More...
 
void resetLevels (int coarsest_ln, int finest_ln)
 Reset range of patch levels over which operations occur. More...
 
void registerMarkerCloud (const std::string &name, int nmarks, int first_lag_idx, int level_number)
 Register or update a range of Lagrangian indices that are to be visualized as a cloud of marker particles. More...
 
void registerLogicallyCartesianBlock (const std::string &name, const SAMRAI::hier::IntVector< NDIM > &nelem, const SAMRAI::hier::IntVector< NDIM > &periodic, int first_lag_idx, int level_number)
 Register or update a range of Lagrangian indices that are to be treated as a logically Cartesian block. More...
 
void registerLogicallyCartesianMultiblock (const std::string &name, const std::vector< SAMRAI::hier::IntVector< NDIM > > &nelem, const std::vector< SAMRAI::hier::IntVector< NDIM > > &periodic, const std::vector< int > &first_lag_idx, int level_number)
 Register or update several ranges of Lagrangian indices that are to be treated as logically Cartesian blocks. More...
 
void registerUnstructuredMesh (const std::string &name, const std::multimap< int, std::pair< int, int > > &edge_map, int level_number)
 Register or update an unstructured mesh. More...
 
void registerCoordsData (SAMRAI::tbox::Pointer< LData > coords_data, int level_number)
 Register the coordinates of the curvilinear mesh with the Silo data writer. More...
 
void registerVariableData (const std::string &var_name, SAMRAI::tbox::Pointer< LData > var_data, int level_number)
 Register a variable for plotting with the Silo data writer. More...
 
void registerVariableData (const std::string &var_name, SAMRAI::tbox::Pointer< LData > var_data, int start_depth, int var_depth, int level_number)
 Register a variable for plotting with the Silo data writer with a specified starting depth and data depth. More...
 
void registerLagrangianAO (AO &ao, int level_number)
 Register or update a single Lagrangian AO (application ordering) objects with the Silo data writer. More...
 
void registerLagrangianAO (std::vector< AO > &ao, int coarsest_ln, int finest_ln)
 Register or update a collection of Lagrangian AO (application ordering) objects with the Silo data writer. More...
 
void writePlotData (int time_step_number, double simulation_time)
 Write the plot data to disk. More...
 
void putToDatabase (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db) override
 
 LSiloDataWriter ()=delete
 Default constructor. More...
 
 LSiloDataWriter (const LSiloDataWriter &from)=delete
 Copy constructor. More...
 
LSiloDataWriteroperator= (const LSiloDataWriter &that)=delete
 Assignment operator. More...
 
void buildVecScatters (AO &ao, int level_number)
 Build the VecScatter objects required to communicate data for plotting. More...
 
void getFromRestart ()
 

Detailed Description

For more information about Silo, see the Silo manual here.

Constructor & Destructor Documentation

◆ LSiloDataWriter() [1/3]

IBTK::LSiloDataWriter::LSiloDataWriter ( std::string  object_name,
std::string  dump_directory_name,
bool  register_for_restart = true 
)
Parameters
object_nameString used for error reporting.
dump_directory_nameString indicating the directory where visualization data is to be written.
register_for_restartBoolean indicating whether to register this object with the restart manager.

◆ ~LSiloDataWriter()

IBTK::LSiloDataWriter::~LSiloDataWriter ( )

◆ LSiloDataWriter() [2/3]

IBTK::LSiloDataWriter::LSiloDataWriter ( )
privatedelete
Note
This constructor is not implemented and should not be used.

◆ LSiloDataWriter() [3/3]

IBTK::LSiloDataWriter::LSiloDataWriter ( const LSiloDataWriter from)
privatedelete
Note
This constructor is not implemented and should not be used.
Parameters
fromThe value to copy to this object.

Member Function Documentation

◆ setPatchHierarchy()

void IBTK::LSiloDataWriter::setPatchHierarchy ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy)

◆ resetLevels()

void IBTK::LSiloDataWriter::resetLevels ( int  coarsest_ln,
int  finest_ln 
)

◆ registerMarkerCloud()

void IBTK::LSiloDataWriter::registerMarkerCloud ( const std::string &  name,
int  nmarks,
int  first_lag_idx,
int  level_number 
)
Note
This method is not collective over all MPI processes. A particular cloud of markers must be registered on only one MPI process.

◆ registerLogicallyCartesianBlock()

void IBTK::LSiloDataWriter::registerLogicallyCartesianBlock ( const std::string &  name,
const SAMRAI::hier::IntVector< NDIM > &  nelem,
const SAMRAI::hier::IntVector< NDIM > &  periodic,
int  first_lag_idx,
int  level_number 
)
Note
This method is not collective over all MPI processes. A particular block of indices must be registered on only one MPI process.

◆ registerLogicallyCartesianMultiblock()

void IBTK::LSiloDataWriter::registerLogicallyCartesianMultiblock ( const std::string &  name,
const std::vector< SAMRAI::hier::IntVector< NDIM > > &  nelem,
const std::vector< SAMRAI::hier::IntVector< NDIM > > &  periodic,
const std::vector< int > &  first_lag_idx,
int  level_number 
)
Note
This method is not collective over all MPI processes. A particular block of indices must be registered on only one MPI process.

◆ registerUnstructuredMesh()

void IBTK::LSiloDataWriter::registerUnstructuredMesh ( const std::string &  name,
const std::multimap< int, std::pair< int, int > > &  edge_map,
int  level_number 
)
Note
This method is not collective over all MPI processes. A particular collection of indices must be registered on only one MPI process.

◆ registerCoordsData()

void IBTK::LSiloDataWriter::registerCoordsData ( SAMRAI::tbox::Pointer< LData coords_data,
int  level_number 
)

◆ registerVariableData() [1/2]

void IBTK::LSiloDataWriter::registerVariableData ( const std::string &  var_name,
SAMRAI::tbox::Pointer< LData var_data,
int  level_number 
)

◆ registerVariableData() [2/2]

void IBTK::LSiloDataWriter::registerVariableData ( const std::string &  var_name,
SAMRAI::tbox::Pointer< LData var_data,
int  start_depth,
int  var_depth,
int  level_number 
)

◆ registerLagrangianAO() [1/2]

void IBTK::LSiloDataWriter::registerLagrangianAO ( AO &  ao,
int  level_number 
)

These AO objects are used to map between (fixed) Lagrangian indices and (time-dependent) PETSc indices. Each time that the AO objects are reset (e.g., during adaptive regridding), the new AO objects must be supplied to the Silo data writer.

◆ registerLagrangianAO() [2/2]

void IBTK::LSiloDataWriter::registerLagrangianAO ( std::vector< AO > &  ao,
int  coarsest_ln,
int  finest_ln 
)

These AO objects are used to map between (fixed) Lagrangian indices and (time-dependent) PETSc indices. Each time that the AO objects are reset (e.g., during adaptive regridding), the new AO objects must be supplied to the Silo data writer.

◆ writePlotData()

void IBTK::LSiloDataWriter::writePlotData ( int  time_step_number,
double  simulation_time 
)

◆ putToDatabase()

void IBTK::LSiloDataWriter::putToDatabase ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database db)
overridevirtual

Write out object state to the given database.

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

Implements SAMRAI::tbox::Serializable.

◆ operator=()

LSiloDataWriter& IBTK::LSiloDataWriter::operator= ( const LSiloDataWriter that)
privatedelete
Note
This operator is not implemented and should not be used.
Parameters
thatThe value to assign to this object.
Returns
A reference to this object.

◆ buildVecScatters()

void IBTK::LSiloDataWriter::buildVecScatters ( AO &  ao,
int  level_number 
)
private

◆ getFromRestart()

void IBTK::LSiloDataWriter::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.

Member Data Documentation

◆ d_object_name

std::string IBTK::LSiloDataWriter::d_object_name
private

◆ d_registered_for_restart

bool IBTK::LSiloDataWriter::d_registered_for_restart
private

◆ d_dump_directory_name

std::string IBTK::LSiloDataWriter::d_dump_directory_name
private

◆ d_time_step_number

int IBTK::LSiloDataWriter::d_time_step_number = -1
private

◆ d_hierarchy

SAMRAI::tbox::Pointer<SAMRAI::hier::PatchHierarchy<NDIM> > IBTK::LSiloDataWriter::d_hierarchy
private

◆ d_coarsest_ln

int IBTK::LSiloDataWriter::d_coarsest_ln = 0
private

◆ d_finest_ln

int IBTK::LSiloDataWriter::d_finest_ln = 0
private

◆ d_nclouds

std::vector<int> IBTK::LSiloDataWriter::d_nclouds
private

◆ d_cloud_names

std::vector<std::vector<std::string> > IBTK::LSiloDataWriter::d_cloud_names
private

◆ d_cloud_nmarks

std::vector<std::vector<int> > IBTK::LSiloDataWriter::d_cloud_nmarks
private

◆ d_cloud_first_lag_idx

std::vector<std::vector<int> > IBTK::LSiloDataWriter::d_cloud_first_lag_idx
private

◆ d_nblocks

std::vector<int> IBTK::LSiloDataWriter::d_nblocks
private

◆ d_block_names

std::vector<std::vector<std::string> > IBTK::LSiloDataWriter::d_block_names
private

◆ d_block_nelems

std::vector<std::vector<SAMRAI::hier::IntVector<NDIM> > > IBTK::LSiloDataWriter::d_block_nelems
private

◆ d_block_periodic

std::vector<std::vector<SAMRAI::hier::IntVector<NDIM> > > IBTK::LSiloDataWriter::d_block_periodic
private

◆ d_block_first_lag_idx

std::vector<std::vector<int> > IBTK::LSiloDataWriter::d_block_first_lag_idx
private

◆ d_nmbs

std::vector<int> IBTK::LSiloDataWriter::d_nmbs
private

◆ d_mb_names

std::vector<std::vector<std::string> > IBTK::LSiloDataWriter::d_mb_names
private

◆ d_mb_nblocks

std::vector<std::vector<int> > IBTK::LSiloDataWriter::d_mb_nblocks
private

◆ d_mb_nelems

std::vector<std::vector<std::vector<SAMRAI::hier::IntVector<NDIM> > > > IBTK::LSiloDataWriter::d_mb_nelems
private

◆ d_mb_periodic

std::vector<std::vector<std::vector<SAMRAI::hier::IntVector<NDIM> > > > IBTK::LSiloDataWriter::d_mb_periodic
private

◆ d_mb_first_lag_idx

std::vector<std::vector<std::vector<int> > > IBTK::LSiloDataWriter::d_mb_first_lag_idx
private

◆ d_nucd_meshes

std::vector<int> IBTK::LSiloDataWriter::d_nucd_meshes
private

◆ d_ucd_mesh_names

std::vector<std::vector<std::string> > IBTK::LSiloDataWriter::d_ucd_mesh_names
private

◆ d_ucd_mesh_vertices

std::vector<std::vector<std::set<int> > > IBTK::LSiloDataWriter::d_ucd_mesh_vertices
private

◆ d_ucd_mesh_edge_maps

std::vector<std::vector<std::multimap<int, std::pair<int, int> > > > IBTK::LSiloDataWriter::d_ucd_mesh_edge_maps
private

◆ d_coords_data

std::vector<SAMRAI::tbox::Pointer<LData> > IBTK::LSiloDataWriter::d_coords_data
private

◆ d_nvars

std::vector<int> IBTK::LSiloDataWriter::d_nvars
private

◆ d_var_names

std::vector<std::vector<std::string> > IBTK::LSiloDataWriter::d_var_names
private

◆ d_var_start_depths

std::vector<std::vector<int> > IBTK::LSiloDataWriter::d_var_start_depths
private

◆ d_var_plot_depths

std::vector<std::vector<int> > IBTK::LSiloDataWriter::d_var_plot_depths
private

◆ d_var_depths

std::vector<std::vector<int> > IBTK::LSiloDataWriter::d_var_depths
private

◆ d_var_data

std::vector<std::vector<SAMRAI::tbox::Pointer<LData> > > IBTK::LSiloDataWriter::d_var_data
private

◆ d_ao

std::vector<AO> IBTK::LSiloDataWriter::d_ao
private

◆ d_build_vec_scatters

std::vector<bool> IBTK::LSiloDataWriter::d_build_vec_scatters
private

◆ d_src_vec

std::vector<std::map<int, Vec> > IBTK::LSiloDataWriter::d_src_vec
private

◆ d_dst_vec

std::vector<std::map<int, Vec> > IBTK::LSiloDataWriter::d_dst_vec
private

◆ d_vec_scatter

std::vector<std::map<int, VecScatter> > IBTK::LSiloDataWriter::d_vec_scatter
private

◆ d_summary_file_opened

bool IBTK::LSiloDataWriter::d_summary_file_opened = false
private

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