#include <vtkexport.h>
Collaboration diagram for postprocess::VtkExport:
Public Member Functions | |
VtkExport (const NedelecMesh &nedelec_mesh, const Epetra_SerialDenseVector &lambda, const Epetra_MultiVector &Q) | |
void | export_mesh (string file) |
void | export_eigenfields (std::string file) |
void | export_eigenfields2 (std::string file, int nof_cells) |
void | export_a_to_b (std::string file, mesh::Vector3 a, mesh::Vector3 b, int nof_intervals) |
void | integrate_a_to_b (int mode_id, mesh::Vector3 a, mesh::Vector3 b, double &int_e) |
int | get_nof_vectors () const |
int | get_nof_dofs () const |
void | get_eigenpair (int k, double *lambda, colarray::Vector< double > *q) |
Private Member Functions | |
void | getdimensions (int N, mesh::Vector3 &box_len, int dim[3]) |
Private Attributes | |
const NedelecMesh & | nedelec_mesh_ |
const Epetra_SerialDenseVector | lambda_ |
const Epetra_MultiVector | Q_ |
const Epetra_Comm & | comm_ |
int | precision_ |
Definition at line 35 of file vtkexport.h.
postprocess::VtkExport::VtkExport | ( | const NedelecMesh & | nedelec_mesh, | |
const Epetra_SerialDenseVector & | lambda, | |||
const Epetra_MultiVector & | Q | |||
) |
Constructor.
NedelecMesh | NedelecMesh data structure. | |
lambda | Eigenvalues (replicated across processors). | |
Q | Eigenvectors (distributed across processors). To make it efficient a View to should be passed. |
void postprocess::VtkExport::export_a_to_b | ( | std::string | file, | |
mesh::Vector3 | a, | |||
mesh::Vector3 | b, | |||
int | nof_intervals | |||
) |
Export E- and B-field along line from point A to point B.
Definition at line 313 of file vtkexport.cpp.
References comm_, NedelecMesh::eval(), NedelecMesh::eval_curl(), get_eigenpair(), get_nof_dofs(), get_nof_vectors(), nedelec_mesh_, precision_, mesh::Vector3::x, mesh::Vector3::y, and mesh::Vector3::z.
Here is the call graph for this function:
void postprocess::VtkExport::export_eigenfields | ( | std::string | file | ) |
this function creates a vtk-file with the topology (Dataset format): UNSTRUCTURED_GRID
file,: | name of the vtk-file which will be written into by this function |
void postprocess::VtkExport::export_eigenfields2 | ( | std::string | file, | |
int | nof_cells | |||
) |
this function creates a vtk-file with the topology (Dataset format): RECTILINEAR_GRID
file | name of the vtk-file which will be written into by this function | |
gridsize | the number of points in grid, which will be laid enclosing the tetrahedron mesh contained in the variable nedelec_mesh |
Definition at line 191 of file vtkexport.cpp.
References comm_, NedelecMesh::eval(), NedelecMesh::eval_curl(), mesh::TetMesh::get_bounding_box(), get_eigenpair(), get_nof_dofs(), get_nof_vectors(), getdimensions(), NedelecMesh::getTetMesh(), nedelec_mesh_, precision_, Q_, tmesh(), mesh::Vector3::x, mesh::Vector3::y, and mesh::Vector3::z.
Here is the call graph for this function:
void postprocess::VtkExport::export_mesh | ( | string | file | ) |
Export tetrahedral mesh to VTK file.
Definition at line 44 of file vtkexport.cpp.
References comm_, mesh::Point::get_coord(), mesh::Tet::get_corner_id(), mesh::TetMesh::get_nof_points(), mesh::TetMesh::get_nof_tets(), mesh::TetMesh::get_point(), mesh::TetMesh::get_tet(), NedelecMesh::getTetMesh(), nedelec_mesh_, precision_, tmesh(), mesh::Vector3::x, mesh::Vector3::y, and mesh::Vector3::z.
Here is the call graph for this function:
void postprocess::VtkExport::get_eigenpair | ( | int | k, | |
double * | lambda, | |||
colarray::Vector< double > * | q | |||
) |
Store k-th eigenpair in lambda, q on processor 0. All processors must call this function. Processors other than 0 may pass 0 for lambda and q.
Definition at line 372 of file vtkexport.cpp.
References colarray::Vector< T >::_n, comm_, get_nof_dofs(), get_nof_vectors(), lambda_, colarray::Vector< T >::operator, and Q_.
Referenced by export_a_to_b(), export_eigenfields2(), and integrate_a_to_b().
Here is the call graph for this function:
int postprocess::VtkExport::get_nof_dofs | ( | ) | const [inline] |
Return number of elements in eigenvector.
Definition at line 72 of file vtkexport.h.
References Q_.
Referenced by export_a_to_b(), export_eigenfields2(), get_eigenpair(), and integrate_a_to_b().
int postprocess::VtkExport::get_nof_vectors | ( | ) | const [inline] |
Return number of eigenvectors.
Definition at line 68 of file vtkexport.h.
References Q_.
Referenced by export_a_to_b(), export_eigenfields2(), and get_eigenpair().
void postprocess::VtkExport::getdimensions | ( | int | N, | |
mesh::Vector3 & | box_len, | |||
int | dim[3] | |||
) | [private] |
this is a helper function for the function exporteigenfields2. This function calculates the dimensions of the the grid laid around the tetrahedron mesh.
N,: | number of points in the grid. | |
center,: | the center of the tetrahedron mesh | |
halfextent,: | the halfextent of the tetrahedron mesh | |
dimensions,: | the dimensions of the grid which are to be calculated |
Definition at line 400 of file vtkexport.cpp.
References mesh::Vector3::x, mesh::Vector3::y, and mesh::Vector3::z.
Referenced by export_eigenfields2().
void postprocess::VtkExport::integrate_a_to_b | ( | int | mode_id, | |
mesh::Vector3 | a, | |||
mesh::Vector3 | b, | |||
double & | int_e | |||
) |
Calculate line integral of E-field along straight line from A to B.
Definition at line 437 of file vtkexport.cpp.
References comm_, mesh::TetMesh::find_boundary(), get_eigenpair(), get_nof_dofs(), NedelecMesh::getTetMesh(), mesh::Vector3::length(), nedelec_mesh_, and tmesh().
Here is the call graph for this function:
const Epetra_Comm& postprocess::VtkExport::comm_ [private] |
Communicator
Definition at line 99 of file vtkexport.h.
Referenced by export_a_to_b(), export_eigenfields2(), export_mesh(), get_eigenpair(), and integrate_a_to_b().
const Epetra_SerialDenseVector postprocess::VtkExport::lambda_ [private] |
Vector containing computed eigenvalues.
Definition at line 94 of file vtkexport.h.
Referenced by get_eigenpair().
const NedelecMesh& postprocess::VtkExport::nedelec_mesh_ [private] |
Mesh data structure.
Definition at line 92 of file vtkexport.h.
Referenced by export_a_to_b(), export_eigenfields2(), export_mesh(), and integrate_a_to_b().
int postprocess::VtkExport::precision_ [private] |
Number of digits used for floating point numbers in output files.
Definition at line 101 of file vtkexport.h.
Referenced by export_a_to_b(), export_eigenfields2(), and export_mesh().
const Epetra_MultiVector postprocess::VtkExport::Q_ [private] |
Multivector containing computed eigenvectors. All vector elements are stored on one processor.
Definition at line 97 of file vtkexport.h.
Referenced by export_eigenfields2(), get_eigenpair(), get_nof_dofs(), and get_nof_vectors().