#include "femaxx_post3d.hh"
#include "femaxx_post3dparam.hh"
Include dependency graph for femaxx_post3d.cpp:
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv) |
Postprocesses and visualizes computational results from femaXX. | |
int | h5_read_point (std::string filename, std::string groupname, int &npoint, double **&coord3d) |
Postprocesses and visualizes computational results from femaXX. | |
int | h5_read_tetvertid (std::string filename, std::string groupname, int &ntet, id_t **&tetvertid) |
int | h5_read_sloc (std::string filename, std::string groupname, int &npoint, double **&coord3d) |
int | h5_read_sampledefield (std::string filename, std::string groupname, int &nsample, double **&efield, int mthmode) |
int | h5_read_sampledhfield (std::string filename, std::string groupname, int &nsample, double **&hfield, int mthmode) |
int | h5_read_eigenvalues (std::string filename, std::string groupname, double *&lambdafreqquality) |
int | vtk_write_mesh (std::string vtklffname, int npoint, double **coord3d, int ntet, id_t **tetvertid) |
int | vtk_write_field (std::string vtklffname, int npoint, double **coord3d, int ntet, id_t **tetvertid, double ***efield, double ***hfield, int nmode) |
int | scf_write_efield (std::string scfname, int npoint, double **sloc, double ***efield, int nmode) |
int | scf_write_hfield (std::string scfname, int npoint, double **sloc, double ***hfield, int nmode) |
int h5_read_eigenvalues | ( | std::string | filename, | |
std::string | groupname, | |||
double *& | lambdafreqquality | |||
) |
Read eigenvalues lambda and return number of eigenmodes present in the HDF5 file
Declare variables related to HDF5 operations
First, read point coordinates from HDF5 file
Read coordinates from file using the hyperslab concept; select hyperslab structure in the file
Corresponds to the number of modes
Define hyperslab file space
Define hyperslab structure in memory space
Define memory hyperslab
allocate memory to store eigenvalues
Read data from hyperslab in the file into the hyperslab in memory
Close operations for specific dataset
Delete dynamically allocated memory if any
Definition at line 927 of file femaxx_post3d.cpp.
References H5_NAME_FEMAX_EIGENVALUE().
Referenced by main().
Here is the call graph for this function:
int h5_read_point | ( | std::string | filename, | |
std::string | groupname, | |||
int & | npoint, | |||
double **& | coord3d | |||
) |
Postprocesses and visualizes computational results from femaXX.
Read tetrahedral point coordinates from HDF5 file
Standard loop indices
Declare variables related to HDF5 operations
First, read point coordinates from HDF5 file
Read coordinates from file using the hyperslab concept; select hyperslab structure in the file
Corresponds to the number of coordinate triples in the file
Define hyperslab file space
Define hyperslab structure in memory space
Define memory hyperslab
allocate memory to store point coordinates
Read data from hyperslab in the file into the hyperslab in memory
__DEBUG__VERBOSE__
Close operations for specific dataset
Delete dynamically allocated memory if any
Definition at line 394 of file femaxx_post3d.cpp.
References H5_NAME_FEMAX_POINTS(), NREALCOORD3D, OKCODE, and TAB_STRING().
Referenced by main().
Here is the call graph for this function:
int h5_read_sampledefield | ( | std::string | filename, | |
std::string | groupname, | |||
int & | nsample, | |||
double **& | efield, | |||
int | mthmode | |||
) |
Read sampled electric field vectors from HDF5 file
Standard loop indices
Declare variables related to HDF5 operations
Third, read sampled electric field from HDF5 file
Read sampled electric field using the hyperslab concept; select hyperslab structure in the file
Corresponds to the number of sampled electric field vectors
Define hyperslab file space
Define hyperslab structure in memory space
Define memory hyperslab
allocate memory to store sampled electric field cartesian components
Read data from hyperslab in the file into the hyperslab in memory
__DEBUG__VERBOSE__
Transfer sampled electric field in 2d array
Delete dynamically allocated variables if any
Close operations for specific dataset
Definition at line 715 of file femaxx_post3d.cpp.
References H5_GROUP_FEMAX_EIGENMODES(), H5_NAME_FEMAX_EIGENFIELD(), and OKCODE.
Referenced by main().
Here is the call graph for this function:
int h5_read_sampledhfield | ( | std::string | filename, | |
std::string | groupname, | |||
int & | nsample, | |||
double **& | hfield, | |||
int | mthmode | |||
) |
Read sampled magnetic field vectors from HDF5 file
Standard loop indices
Declare variables related to HDF5 operations
Third, read sampled electric field from HDF5 file
Read sampled magnetic field using the hyperslab concept; select hyperslab structure in the file
Corresponds to the number of sampled electric field vectors
Define hyperslab file space
Define hyperslab structure in memory space
Define memory hyperslab
allocate memory to store sampled electric field cartesian components
Read data from hyperslab in the file into the hyperslab in memory
__DEBUG__VERBOSE__
Transfer sampled electric field in 2d array
Delete dynamically allocated variables if any
Close operations for specific dataset
Definition at line 821 of file femaxx_post3d.cpp.
References H5_GROUP_FEMAX_EIGENMODES(), H5_NAME_FEMAX_EIGENCURL(), and OKCODE.
Referenced by main().
Here is the call graph for this function:
int h5_read_sloc | ( | std::string | filename, | |
std::string | groupname, | |||
int & | npoint, | |||
double **& | coord3d | |||
) |
Read field sampling locations coordinates from HDF5 file
Standard loop indices
Declare variables related to HDF5 operations
First, read point coordinates from HDF5 file
Read coordinates from file using the hyperslab concept; select hyperslab structure in the file
Corresponds to the number of coordinate triples in the file
Define hyperslab file space
Define hyperslab structure in memory space
Define memory hyperslab
allocate memory to store point coordinates
Read data from hyperslab in the file into the hyperslab in memory
__DEBUG__VERBOSE__
Close operations for specific dataset
Delete dynamically allocated memory if any
Definition at line 607 of file femaxx_post3d.cpp.
References H5_GROUP_FEMAX_EIGENMODES(), H5_NAME_FEMAX_SLOCBASENAME(), NREALCOORD3D, OKCODE, and TAB_STRING().
Referenced by main().
Here is the call graph for this function:
int h5_read_tetvertid | ( | std::string | filename, | |
std::string | groupname, | |||
int & | ntet, | |||
id_t **& | tetvertid | |||
) |
Read tetrahedral vertex id's from HDF5 file
Standard loop indices
Declare variables related to HDF5 operations
Second, read tetrahedral vertex id's from HDF5 file
Read tetrahedral vertex id's from file using the hyperslab concept; select hyperslab structure in the file
Corresponds to the number of coordinate triples in the file
Define hyperslab file space
Define hyperslab structure in memory space
Define memory hyperslab
allocate memory to store point coordinates
Read data from hyperslab in the file into the hyperslab in memory
Transfer tetrahedral vertex id's into 2d array
__DEBUG__VERBOSE__
Delete dynamically allocated variables if any
Close operations for specific dataset
Definition at line 499 of file femaxx_post3d.cpp.
References H5_NAME_FEMAX_TETVID(), NCORNERTET, and OKCODE.
Referenced by main().
Here is the call graph for this function:
int main | ( | int | argc, | |
char ** | argv | |||
) |
Postprocesses and visualizes computational results from femaXX.
rights - copyright Benedikt Oswald, <benedkt.oswald@psi.ch>, (C) 2005, See COPYING file that comes with this distribution file name - femax_visuals file type - Implementation file objective - do postprocessing and visualiztion of femaXX computational results author - Benedikt Oswald modified - 2006 jan 27, benedikt oswald, creation modified - 2006 feb 10, benedikt oswald, reorganized into main and several functions modified - features - does postprocessing and visualiztion of femaXX computational results implementation - femaxx_post3d is tool for visualizing the electro-magnetic mode fields of the analyzed cavity; implementation - additionally, it will calculate quality factors, losses and other cavity parameters of interest implementation - to designers;
Create the command line parameter object.
Define madatory program options.
Define optional program options.
Make a group from mandatory and optional program options.
Parse the command line.
Action in relation to the command line options.
Show the help.
Store Command line parameters respective class.
If the command line parsing fails show error message.
Print all command line parameters.
Check all command line parameters.
Follows the core postprocessor part
Read eigenvalue problem solution data from HDF5 file
Write mesh into VTK legacy file format
transfer eigenmodal quantities into 2-dimensional array
Retrieve field sampling locations from HDF5 formatted file
Write sampled electric and magnetic field, including mesh into VTK legacy file format
Free dynamically allocated variables, if any
Definition at line 22 of file femaxx_post3d.cpp.
References FemaxxPost3dparam::checkAll(), ERRORCODE, FemaxxPost3dparam::getInstance(), H5_GROUP_FEMAX_EIGENMESH(), H5_GROUP_FEMAX_EIGENMODES(), h5_read_eigenvalues(), h5_read_point(), h5_read_sampledefield(), h5_read_sampledhfield(), h5_read_sloc(), h5_read_tetvertid(), FemaxxPost3dparam::inputFile(), lambda, OKCODE, FemaxxPost3dparam::outputFile(), scf_write_efield(), scf_write_hfield(), FemaxxPost3dparam::showAll(), vtk_write_field(), and vtk_write_mesh().
Here is the call graph for this function:
int scf_write_efield | ( | std::string | scfname, | |
int | npoint, | |||
double ** | sloc, | |||
double *** | efield, | |||
int | nmode | |||
) |
Write sampled electric field into simple column format (SCF) for Markus Bopp
Standard loop indices
Export the mesh in VTK legacy file format
Set numeric precision
Write file header
Close the output file
Definition at line 1261 of file femaxx_post3d.cpp.
References DEFAULT_FLOAT_PRECISION, NREALCOORD3D, OKCODE, SCF_EXTENSION(), and TAB_STRING().
Referenced by main().
Here is the call graph for this function:
int scf_write_hfield | ( | std::string | scfname, | |
int | npoint, | |||
double ** | sloc, | |||
double *** | hfield, | |||
int | nmode | |||
) |
Write sampled magnetic field into simple column format (SCF) for Markus Bopp
Standard loop indices
Export the mesh in VTK legacy file format
Set numeric precision
Write file header
Close the output file
Definition at line 1338 of file femaxx_post3d.cpp.
References DEFAULT_FLOAT_PRECISION, NREALCOORD3D, OKCODE, SCF_EXTENSION(), and TAB_STRING().
Referenced by main().
Here is the call graph for this function:
int vtk_write_field | ( | std::string | vtklffname, | |
int | npoint, | |||
double ** | coord3d, | |||
int | ntet, | |||
id_t ** | tetvertid, | |||
double *** | efield, | |||
double *** | hfield, | |||
int | nmode | |||
) |
Write sampled electric field into VTK legacy file format
Standard loop indices
Export the mesh in VTK legacy file format
Set numeric precision
Write file header
We store a tetrahedral mesh
Now, write data associated with cells
loop over all modal electric fields and write vectors associated with 3d coordinate points into the file
loop over all modal magnetic fields and write vectors associated with 3d coordinate points into the file
Close the output file
Definition at line 1096 of file femaxx_post3d.cpp.
References DEFAULT_FLOAT_PRECISION, NCORNERTET, NREALCOORD3D, OKCODE, SINGLE_SPACE(), TAB_STRING(), VTK_LFF_EXTENSION(), and VTK_LFF_TETRAHEDRON_CODE.
Referenced by main().
Here is the call graph for this function:
int vtk_write_mesh | ( | std::string | vtklffname, | |
int | npoint, | |||
double ** | coord3d, | |||
int | ntet, | |||
id_t ** | tetvertid | |||
) |
Write mesh into VTK legacy file format
Standard loop indices
Export the mesh in VTK legacy file format
Set numeric precision
Write file header
We store a tetrahedral mesh
At present the process responsible for the tetrahedron is stored in the 4th column of tetvertid
Close the output file
Definition at line 1015 of file femaxx_post3d.cpp.
References DEFAULT_FLOAT_PRECISION, NCORNERTET, NREALCOORD3D, OKCODE, SINGLE_SPACE(), TAB_STRING(), VTK_LFF_EXTENSION(), and VTK_LFF_TETRAHEDRON_CODE.
Referenced by main().
Here is the call graph for this function: