HDF5ParallelReader Class Reference

#include <HDF5ParallelReader.h>

Collaboration diagram for HDF5ParallelReader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ~HDF5ParallelReader ()
 HDF5ParallelReader (const char *inputFile, MeshBuilder *builder, MPI_Comm comm)
void read ()
void export_dist (char *file)
int main (int argc, char **argv)

Private Member Functions

double seconds ()
void print_tet_global_id ()
void read_tets ()
void read_mats ()
void partition ()
void sort_buffer (int *sendcnts)
void distribute ()
void generate_point_global_id (int *slab_offsets, int *slab_lengths, int slab_count)
void read_points ()
void read_boundary ()
void open_file ()
void close_file ()

Private Attributes

const char * _inputFile
MeshBuilder_builder
MPI_Comm _comm
MPI_Info _info
int _mpi_size
int _mpi_rank
double * _point_coords
int _numpoints_global
int _numpoints_local
int * _tetids
int _numtets_global
int _numtets_local
int * _matids
int * _faces
int _numbfaces_global
int _numbfaces_local
int * _tet_partition
int * _tet_global_id
int * _point_global_id
hid_t _file_id
hid_t _plist_id

Detailed Description

Definition at line 23 of file HDF5ParallelReader.h.


Constructor & Destructor Documentation

HDF5ParallelReader::~HDF5ParallelReader (  ) 

Deconstructor FIXME add some cleanup here?

Definition at line 4 of file HDF5ParallelReader.cpp.

References _matids, _point_coords, _point_global_id, _tet_global_id, _tet_partition, and _tetids.

HDF5ParallelReader::HDF5ParallelReader ( const char *  inputFile,
MeshBuilder builder,
MPI_Comm  comm 
)

Contruct new reader.

Parameters:
inputFile character array containing path and name of input file
builder MeshBuilder object recieving data
comm MPI communicator

Definition at line 13 of file HDF5ParallelReader.cpp.

References _comm, _info, _mpi_rank, and _mpi_size.

Referenced by main().


Member Function Documentation

void HDF5ParallelReader::close_file (  )  [private]

Close HDF5 file

Definition at line 673 of file HDF5ParallelReader.cpp.

References _file_id, and _plist_id.

Referenced by main(), and read().

void HDF5ParallelReader::distribute (  )  [private]

Redistribute tetrahedra across processors according to partition

Definition at line 280 of file HDF5ParallelReader.cpp.

References _comm, _matids, _mpi_size, _numtets_local, _tet_global_id, _tet_partition, _tetids, and sort_buffer().

Referenced by main(), and read().

Here is the call graph for this function:

void HDF5ParallelReader::export_dist ( char *  file  ) 

Export tet distribution to vtk file

Definition at line 569 of file HDF5ParallelReader.cpp.

References _comm, _file_id, _mpi_rank, _mpi_size, _numpoints_global, _numtets_global, _numtets_local, _tetids, and REALMEMTYPE.

Referenced by main(), and main().

void HDF5ParallelReader::generate_point_global_id ( int *  slab_offsets,
int *  slab_lengths,
int  slab_count 
) [private]

Generate global ID of poins (Re)generate the node global ID's from HDF5 hyperslab data

Parameters:
slab_offsets starting point of slabs
slab_lengths lengths of slabs
slab_count number of slabs

Definition at line 368 of file HDF5ParallelReader.cpp.

References _numpoints_local, and _point_global_id.

Referenced by read_points().

int HDF5ParallelReader::main ( int  argc,
char **  argv 
)

Test method used in the making of HDF5ParallelReader

Definition at line 709 of file HDF5ParallelReader.cpp.

References _builder, _matids, _mpi_rank, _numpoints_local, _numtets_local, _point_coords, _point_global_id, _tet_partition, _tetids, close_file(), comm, distribute(), export_dist(), MeshBuilder::finalize_coord(), MeshBuilder::finalize_tet(), TetMeshBuilder::get_mesh(), HDF5ParallelReader(), MeshBuilder::init_coord(), MeshBuilder::init_tet(), open_file(), partition(), read_boundary(), read_mats(), read_points(), read_tets(), seconds(), MeshBuilder::set_coord(), and MeshBuilder::set_tet().

Here is the call graph for this function:

void HDF5ParallelReader::open_file (  )  [private]

Open HDF5 file

Definition at line 663 of file HDF5ParallelReader.cpp.

References _comm, _file_id, _info, _inputFile, and _plist_id.

Referenced by main(), and read().

void HDF5ParallelReader::partition (  )  [private]

Generate a tetrahedra partition with ParMETIS

Definition at line 165 of file HDF5ParallelReader.cpp.

References _comm, _mpi_size, _numtets_global, _numtets_local, _tet_partition, and _tetids.

Referenced by main(), and read().

void HDF5ParallelReader::print_tet_global_id (  )  [private]

Print tetrahedra global ID's

Definition at line 26 of file HDF5ParallelReader.cpp.

References _mpi_rank, _numtets_local, and _tet_global_id.

void HDF5ParallelReader::read (  ) 

Read mesh data from input stream and call corresponding builder methods.

Definition at line 678 of file HDF5ParallelReader.cpp.

References _builder, _matids, _numpoints_local, _numtets_local, _point_coords, _point_global_id, _tetids, close_file(), distribute(), MeshBuilder::finalize_coord(), MeshBuilder::finalize_tet(), MeshBuilder::init_coord(), MeshBuilder::init_tet(), open_file(), partition(), read_boundary(), read_mats(), read_points(), read_tets(), MeshBuilder::set_coord(), and MeshBuilder::set_tet().

Referenced by FemaxxDriver::load_mesh(), and main().

Here is the call graph for this function:

void HDF5ParallelReader::read_boundary (  )  [private]

Read boundary data from HDF5 file

Definition at line 520 of file HDF5ParallelReader.cpp.

References _builder, _file_id, _numbfaces_global, _numbfaces_local, _plist_id, MeshBuilder::finalize_bc(), INTMEMTYPE, MeshBuilder::set_bc(), and x.

Referenced by main(), and read().

Here is the call graph for this function:

void HDF5ParallelReader::read_mats (  )  [private]

Read materials from HDF5 file

Definition at line 102 of file HDF5ParallelReader.cpp.

References _file_id, _matids, _mpi_rank, _mpi_size, _numtets_global, _numtets_local, _plist_id, INTMEMTYPE, and x.

Referenced by main(), and read().

void HDF5ParallelReader::read_points (  )  [private]

Read node coordinates from HDF5 file

Definition at line 385 of file HDF5ParallelReader.cpp.

References _file_id, _numpoints_global, _numpoints_local, _numtets_local, _plist_id, _point_coords, _tetids, generate_point_global_id(), REALMEMTYPE, and x.

Referenced by main(), and read().

Here is the call graph for this function:

void HDF5ParallelReader::read_tets (  )  [private]

Read tetrahedra from HDF5 file

Definition at line 36 of file HDF5ParallelReader.cpp.

References _file_id, _mpi_rank, _mpi_size, _numtets_global, _numtets_local, _plist_id, _tet_global_id, _tetids, INTMEMTYPE, rInfoAll, and x.

Referenced by main(), and read().

double HDF5ParallelReader::seconds (  )  [private]

Get system time

Definition at line 20 of file HDF5ParallelReader.cpp.

Referenced by main().

void HDF5ParallelReader::sort_buffer ( int *  sendcnts  )  [private]

Sort tetrahedra buffer according to ParMETIS partition This sorts the sendbuffer by the target proc. A bin/bucket sort where the sizes of the buckets is known The bucket sizes are the number of tetrahedra to send to proc i.

Parameters:
sendcnts pointer to array of bucket sizes

Definition at line 235 of file HDF5ParallelReader.cpp.

References _matids, _mpi_size, _numtets_local, _tet_global_id, _tet_partition, and _tetids.

Referenced by distribute().


Member Data Documentation

MeshBuilder* HDF5ParallelReader::_builder [private]

Meshbuilder to which to pass the data read

Definition at line 98 of file HDF5ParallelReader.h.

Referenced by main(), read(), and read_boundary().

MPI_Comm HDF5ParallelReader::_comm [private]

MPI communicator

Definition at line 101 of file HDF5ParallelReader.h.

Referenced by distribute(), export_dist(), HDF5ParallelReader(), open_file(), and partition().

int* HDF5ParallelReader::_faces [private]

Array containing node ID's of boundary faces

Definition at line 134 of file HDF5ParallelReader.h.

hid_t HDF5ParallelReader::_file_id [private]

HDF5 object identifying the inputfile

Definition at line 152 of file HDF5ParallelReader.h.

Referenced by close_file(), export_dist(), open_file(), read_boundary(), read_mats(), read_points(), and read_tets().

MPI_Info HDF5ParallelReader::_info [private]

MPI internal information needed by HDF5 for parallel file access

Definition at line 104 of file HDF5ParallelReader.h.

Referenced by HDF5ParallelReader(), and open_file().

const char* HDF5ParallelReader::_inputFile [private]

Name of input HDF5 file

Definition at line 95 of file HDF5ParallelReader.h.

Referenced by open_file().

int* HDF5ParallelReader::_matids [private]

Array containing material ID's of tetrahedra

Definition at line 131 of file HDF5ParallelReader.h.

Referenced by distribute(), main(), read(), read_mats(), sort_buffer(), and ~HDF5ParallelReader().

int HDF5ParallelReader::_mpi_rank [private]

ID number of this processor

Definition at line 110 of file HDF5ParallelReader.h.

Referenced by export_dist(), HDF5ParallelReader(), main(), print_tet_global_id(), read_mats(), and read_tets().

int HDF5ParallelReader::_mpi_size [private]

Number of processors

Definition at line 107 of file HDF5ParallelReader.h.

Referenced by distribute(), export_dist(), HDF5ParallelReader(), partition(), read_mats(), read_tets(), and sort_buffer().

int HDF5ParallelReader::_numbfaces_global [private]

Number of boundary faces globally

Definition at line 137 of file HDF5ParallelReader.h.

Referenced by read_boundary().

int HDF5ParallelReader::_numbfaces_local [private]

Number of boundary faces locally

Definition at line 140 of file HDF5ParallelReader.h.

Referenced by read_boundary().

int HDF5ParallelReader::_numpoints_global [private]

Number of nodes globally

Definition at line 116 of file HDF5ParallelReader.h.

Referenced by export_dist(), and read_points().

int HDF5ParallelReader::_numpoints_local [private]

Number of nodes locally

Definition at line 119 of file HDF5ParallelReader.h.

Referenced by generate_point_global_id(), main(), read(), and read_points().

int HDF5ParallelReader::_numtets_global [private]

Number of tetrahedra globally

Definition at line 125 of file HDF5ParallelReader.h.

Referenced by export_dist(), partition(), read_mats(), and read_tets().

int HDF5ParallelReader::_numtets_local [private]

Number of tetrahedra locally

Definition at line 128 of file HDF5ParallelReader.h.

Referenced by distribute(), export_dist(), main(), partition(), print_tet_global_id(), read(), read_mats(), read_points(), read_tets(), and sort_buffer().

hid_t HDF5ParallelReader::_plist_id [private]

HDF5 object containing parallel file reading access parameters

Definition at line 155 of file HDF5ParallelReader.h.

Referenced by close_file(), open_file(), read_boundary(), read_mats(), read_points(), and read_tets().

double* HDF5ParallelReader::_point_coords [private]

Array containing node coordinates

Definition at line 113 of file HDF5ParallelReader.h.

Referenced by main(), read(), read_points(), and ~HDF5ParallelReader().

int* HDF5ParallelReader::_point_global_id [private]

Array containing the global ID (input file order) of local nodes

Definition at line 149 of file HDF5ParallelReader.h.

Referenced by generate_point_global_id(), main(), read(), and ~HDF5ParallelReader().

int* HDF5ParallelReader::_tet_global_id [private]

Array containing the global ID (input file order) of local tets

Definition at line 146 of file HDF5ParallelReader.h.

Referenced by distribute(), print_tet_global_id(), read_tets(), sort_buffer(), and ~HDF5ParallelReader().

int* HDF5ParallelReader::_tet_partition [private]

Array containing ID's of the processors to which to send local tetrahedra

Definition at line 143 of file HDF5ParallelReader.h.

Referenced by distribute(), main(), partition(), sort_buffer(), and ~HDF5ParallelReader().

int* HDF5ParallelReader::_tetids [private]

Array containing node ID's of tetrahedra

Definition at line 122 of file HDF5ParallelReader.h.

Referenced by distribute(), export_dist(), main(), partition(), read(), read_points(), read_tets(), sort_buffer(), and ~HDF5ParallelReader().


The documentation for this class was generated from the following files:
Generated on Fri Oct 26 13:35:16 2007 for FEMAXX (Finite Element Maxwell Eigensolver) by  doxygen 1.4.7