Probe class to monitor a volume region of the domain.
More...
#include <probes.h>
|
| PetscErrorCode | init (const MPI_Comm &comm, const YAML::Node &node, const type::Mesh &mesh) |
| | Initialize the probe. More...
|
| |
| PetscErrorCode | getInfo (const type::Mesh &mesh, const type::RealVec2D &box) |
| | Get information about the sub-mesh area to monitor. More...
|
| |
| PetscErrorCode | createIS (const type::Mesh &mesh) |
| | Create the index set for the points to monitor. More...
|
| |
| PetscErrorCode | createGrid (const type::Mesh &mesh) |
| | Get the sub-mesh area to monitor. More...
|
| |
| PetscErrorCode | writeGrid (const std::string &filePath) |
| | Write the sub mesh grid points into a file. More...
|
| |
| PetscErrorCode | writeGrid_ASCII (const std::string &filePath) |
| | Write the sub mesh into an ASCII file. More...
|
| |
| PetscErrorCode | writeGrid_HDF5 (const std::string &filePath) |
| | Write the sub mesh into a HDF5 file. More...
|
| |
| PetscErrorCode | writeIS (const std::string &filePath) |
| | Write index set (natural ordering) into a file. More...
|
| |
| PetscErrorCode | writeIS_HDF5 (const std::string &filePath) |
| | Write index set (natural ordering) into a HDF5 file. More...
|
| |
| PetscErrorCode | writeIS_ASCII (const std::string &filePath) |
| | Write index set (natural ordering) into a HDF5 file. More...
|
| |
| PetscErrorCode | monitorVec (const DM &da, const Vec &fvec, const PetscInt &n, const PetscReal &t) |
| | Monitor a sub-region of a vector and possibly output data to file. More...
|
| |
| PetscErrorCode | writeVec (const Vec &vec, const PetscReal &t) |
| | Output a PETSc Vec object to file. More...
|
| |
| PetscErrorCode | writeVec_ASCII (const Vec &vec, const PetscReal &t) |
| | Output a PETSc Vec object to an ASCII file. More...
|
| |
| PetscErrorCode | writeVec_HDF5 (const Vec &vec, const PetscReal &t) |
| | Output a PETSc Vec object to a HDF5 file. More...
|
| |
Probe class to monitor a volume region of the domain.
- See also
- Miscellaneous functions, petibm::type::Probe, petibm::misc::createProbe
Definition at line 129 of file probes.h.
◆ ProbeVolume()
| petibm::misc::ProbeVolume::ProbeVolume |
( |
const MPI_Comm & |
comm, |
|
|
const YAML::Node & |
node, |
|
|
const type::Mesh & |
mesh |
|
) |
| |
◆ ~ProbeVolume()
| virtual petibm::misc::ProbeVolume::~ProbeVolume |
( |
| ) |
|
|
virtualdefault |
◆ createGrid()
| PetscErrorCode petibm::misc::ProbeVolume::createGrid |
( |
const type::Mesh & |
mesh | ) |
|
|
protected |
Get the sub-mesh area to monitor.
- Parameters
-
| mesh | [in] Cartesian mesh object |
- Returns
- PetscErrorCode
Definition at line 313 of file probes.cpp.
◆ createIS()
| PetscErrorCode petibm::misc::ProbeVolume::createIS |
( |
const type::Mesh & |
mesh | ) |
|
|
protected |
Create the index set for the points to monitor.
- Parameters
-
| mesh | [in] Cartesian mesh object |
- Returns
- PetscErrorCode
Definition at line 267 of file probes.cpp.
◆ destroy()
| PetscErrorCode petibm::misc::ProbeVolume::destroy |
( |
| ) |
|
|
virtual |
◆ getInfo()
Get information about the sub-mesh area to monitor.
- Parameters
-
| mesh | [in] Cartesian mesh object |
| box | [in] Box area to monitor |
- Returns
- PetscErrorCode
Definition at line 240 of file probes.cpp.
◆ init()
| PetscErrorCode petibm::misc::ProbeVolume::init |
( |
const MPI_Comm & |
comm, |
|
|
const YAML::Node & |
node, |
|
|
const type::Mesh & |
mesh |
|
) |
| |
|
protectedvirtual |
◆ monitor()
| PetscErrorCode petibm::misc::ProbeBase::monitor |
( |
const type::Solution & |
solution, |
|
|
const type::Mesh & |
mesh, |
|
|
const PetscInt & |
n, |
|
|
const PetscReal & |
t |
|
) |
| |
|
inherited |
Monitor the field solution and output data to file.
- Parameters
-
| solution | [in] Data object with the field solutions |
| mesh | [in] Cartesian mesh object |
| n | [in] Time-step index |
| t | [in] Time |
- Returns
- PetscErrorCode
Definition at line 114 of file probes.cpp.
◆ monitorVec()
| PetscErrorCode petibm::misc::ProbeVolume::monitorVec |
( |
const DM & |
da, |
|
|
const Vec & |
fvec, |
|
|
const PetscInt & |
n, |
|
|
const PetscReal & |
t |
|
) |
| |
|
protectedvirtual |
Monitor a sub-region of a vector and possibly output data to file.
- Parameters
-
| da | [in] Parallel layout of the full-domain vector |
| fvec | [in] Full-domain PETSc Vec object to monitor |
| n | [in] Time-step index |
| t | [in] Time |
Implements petibm::misc::ProbeBase.
Definition at line 487 of file probes.cpp.
◆ writeGrid()
| PetscErrorCode petibm::misc::ProbeVolume::writeGrid |
( |
const std::string & |
filePath | ) |
|
|
protected |
Write the sub mesh grid points into a file.
Supported formats are HDF5 and ASCII.
- Parameters
-
| filePath | [in] Path of the file to write in |
- Returns
- PetscErrorCode
Definition at line 332 of file probes.cpp.
◆ writeGrid_ASCII()
| PetscErrorCode petibm::misc::ProbeVolume::writeGrid_ASCII |
( |
const std::string & |
filePath | ) |
|
|
protected |
Write the sub mesh into an ASCII file.
- Parameters
-
| filePath | [in] Path of the file to write in |
- Returns
- PetscErrorCode
Definition at line 392 of file probes.cpp.
◆ writeGrid_HDF5()
| PetscErrorCode petibm::misc::ProbeVolume::writeGrid_HDF5 |
( |
const std::string & |
filePath | ) |
|
|
protected |
Write the sub mesh into a HDF5 file.
- Parameters
-
| filePath | [in] Path of the file to write in |
- Returns
- PetscErrorCode
Definition at line 356 of file probes.cpp.
◆ writeIS()
| PetscErrorCode petibm::misc::ProbeVolume::writeIS |
( |
const std::string & |
filePath | ) |
|
|
protected |
Write index set (natural ordering) into a file.
Supported formats are HDF5 and ASCII.
- Parameters
-
| filePath | [in] Path of the file to write in |
- Returns
- PetscErrorCode
Definition at line 431 of file probes.cpp.
◆ writeIS_ASCII()
| PetscErrorCode petibm::misc::ProbeVolume::writeIS_ASCII |
( |
const std::string & |
filePath | ) |
|
|
protected |
Write index set (natural ordering) into a HDF5 file.
- Parameters
-
| filePath | [in] Path of the file to write in |
- Returns
- PetscErrorCode
Definition at line 471 of file probes.cpp.
◆ writeIS_HDF5()
| PetscErrorCode petibm::misc::ProbeVolume::writeIS_HDF5 |
( |
const std::string & |
filePath | ) |
|
|
protected |
Write index set (natural ordering) into a HDF5 file.
- Parameters
-
| filePath | [in] Path of the file to write in |
- Returns
- PetscErrorCode
Definition at line 454 of file probes.cpp.
◆ writeVec()
| PetscErrorCode petibm::misc::ProbeVolume::writeVec |
( |
const Vec & |
vec, |
|
|
const PetscReal & |
t |
|
) |
| |
|
protected |
Output a PETSc Vec object to file.
Supported formats are HDF5 and ASCII.
- Parameters
-
| vec | [in] PETSc Vec object to output |
| t | [in] Time |
- Returns
- PetscErrorCode
Definition at line 527 of file probes.cpp.
◆ writeVec_ASCII()
| PetscErrorCode petibm::misc::ProbeVolume::writeVec_ASCII |
( |
const Vec & |
vec, |
|
|
const PetscReal & |
t |
|
) |
| |
|
protected |
Output a PETSc Vec object to an ASCII file.
- Parameters
-
| vec | [in] PETSc Vec object to output |
| t | [in] Time |
- Returns
- PetscErrorCode
Definition at line 573 of file probes.cpp.
◆ writeVec_HDF5()
| PetscErrorCode petibm::misc::ProbeVolume::writeVec_HDF5 |
( |
const Vec & |
vec, |
|
|
const PetscReal & |
t |
|
) |
| |
|
protected |
Output a PETSc Vec object to a HDF5 file.
- Parameters
-
| vec | [in] PETSc Vec object to output |
| t | [in] Time |
- Returns
- PetscErrorCode
Definition at line 551 of file probes.cpp.
◆ atol
| PetscReal petibm::misc::ProbeVolume::atol |
|
protected |
Absolute tolerance criterion when comparing values.
Definition at line 169 of file probes.h.
◆ box
Limits of the volume.
Definition at line 145 of file probes.h.
◆ comm
| MPI_Comm petibm::misc::ProbeBase::comm |
|
protectedinherited |
MPI communicator.
Definition at line 90 of file probes.h.
◆ commRank
| PetscMPIInt petibm::misc::ProbeBase::commRank |
|
protectedinherited |
Rank of the local process in the MPI communicator.
Definition at line 96 of file probes.h.
◆ commSize
| PetscMPIInt petibm::misc::ProbeBase::commSize |
|
protectedinherited |
Number of processes in the MPI communicator.
Definition at line 93 of file probes.h.
◆ coord
Grid point coordinates in the volume.
Definition at line 157 of file probes.h.
◆ count
| PetscInt petibm::misc::ProbeVolume::count = 0 |
|
protected |
Counter to know when to flush to the data to file.
Definition at line 175 of file probes.h.
◆ dvec
| Vec petibm::misc::ProbeVolume::dvec |
|
protected |
Sub-vector of the region to monitor.
Definition at line 154 of file probes.h.
◆ field
Type of the field to monitor.
Definition at line 72 of file probes.h.
◆ isNatural
| IS petibm::misc::ProbeVolume::isNatural |
|
protected |
Index set for the grid points to monitor (Natural ordering).
Definition at line 151 of file probes.h.
◆ isPetsc
| IS petibm::misc::ProbeVolume::isPetsc |
|
protected |
Index set for the grid points to monitor (PETSc ordering).
Definition at line 148 of file probes.h.
◆ n_monitor
| PetscInt petibm::misc::ProbeBase::n_monitor |
|
protectedinherited |
Frequency of monitoring the solution (number of time steps).
Definition at line 75 of file probes.h.
◆ n_sum
| PetscInt petibm::misc::ProbeVolume::n_sum |
|
protected |
Frequency of saving the data to file.
Definition at line 172 of file probes.h.
◆ name
| std::string petibm::misc::ProbeBase::name |
|
protectedinherited |
Name of the probe as a string.
Definition at line 66 of file probes.h.
◆ nPts
| PetscInt petibm::misc::ProbeVolume::nPts |
|
protected |
Number of grid points in the volume.
Definition at line 163 of file probes.h.
◆ nPtsDir
Number of grid points along each direction in the volume.
Definition at line 160 of file probes.h.
◆ path
| std::string petibm::misc::ProbeBase::path |
|
protectedinherited |
Path of the file to output the solution.
Definition at line 69 of file probes.h.
◆ startIdxDir
Index of the first point in the volume in each direction.
Definition at line 166 of file probes.h.
◆ t_end
| PetscReal petibm::misc::ProbeBase::t_end |
|
protectedinherited |
Monitoring ending time.
Definition at line 81 of file probes.h.
◆ t_start
| PetscReal petibm::misc::ProbeBase::t_start |
|
protectedinherited |
Monitoring starting time.
Definition at line 78 of file probes.h.
◆ viewer
| PetscViewer petibm::misc::ProbeBase::viewer |
|
protectedinherited |
PETSc viewer to output the solution.
Definition at line 84 of file probes.h.
◆ viewerType
| PetscViewerType petibm::misc::ProbeBase::viewerType |
|
protectedinherited |
Type of the PETSc viewer to use.
Definition at line 87 of file probes.h.
The documentation for this class was generated from the following files: