PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
petibm::misc::ProbePoint Class Reference

Probe class to monitor the solution at a single point. More...

#include <probes.h>

Inheritance diagram for petibm::misc::ProbePoint:
[legend]

Public Member Functions

 ProbePoint (const MPI_Comm &comm, const YAML::Node &node, const type::Mesh &mesh)
 Default constructor. More...
 
virtual ~ProbePoint ()=default
 Default destructor. More...
 
PetscErrorCode destroy ()
 Manually destroy the data. More...
 
PetscErrorCode monitor (const type::Solution &solution, const type::Mesh &mesh, const PetscInt &n, const PetscReal &t)
 Monitor the field solution and output data to file. More...
 

Protected Member Functions

PetscErrorCode init (const MPI_Comm &comm, const YAML::Node &node, const type::Mesh &mesh)
 Initialize the probe. 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...
 

Protected Attributes

type::RealVec1D loc
 Coordinates of the point to monitor around. More...
 
PetscBool pointOnLocalProc
 True if target point located on local sub-domain. More...
 
Vec svec
 Local (ghosted) PETSc Vec object with neighboring values. More...
 
PetscReal value
 Interpolated value. More...
 
type::LinInterp interp
 Interpolating object to monitor at a single point. More...
 
std::string name
 Name of the probe as a string. More...
 
std::string path
 Path of the file to output the solution. More...
 
type::Field field
 Type of the field to monitor. More...
 
PetscInt n_monitor
 Frequency of monitoring the solution (number of time steps). More...
 
PetscReal t_start
 Monitoring starting time. More...
 
PetscReal t_end
 Monitoring ending time. More...
 
PetscViewer viewer
 PETSc viewer to output the solution. More...
 
PetscViewerType viewerType
 Type of the PETSc viewer to use. More...
 
MPI_Comm comm
 MPI communicator. More...
 
PetscMPIInt commSize
 Number of processes in the MPI communicator. More...
 
PetscMPIInt commRank
 Rank of the local process in the MPI communicator. More...
 

Detailed Description

Probe class to monitor the solution at a single point.

See also
Miscellaneous functions, petibm::type::Probe, petibm::misc::createProbe

Definition at line 291 of file probes.h.

Constructor & Destructor Documentation

◆ ProbePoint()

petibm::misc::ProbePoint::ProbePoint ( const MPI_Comm &  comm,
const YAML::Node &  node,
const type::Mesh mesh 
)

Default constructor.

Definition at line 596 of file probes.cpp.

◆ ~ProbePoint()

virtual petibm::misc::ProbePoint::~ProbePoint ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ destroy()

PetscErrorCode petibm::misc::ProbePoint::destroy ( )
virtual

Manually destroy the data.

Reimplemented from petibm::misc::ProbeBase.

Definition at line 645 of file probes.cpp.

◆ init()

PetscErrorCode petibm::misc::ProbePoint::init ( const MPI_Comm &  comm,
const YAML::Node &  node,
const type::Mesh mesh 
)
protectedvirtual

Initialize the probe.

Parameters
comm[in] MPI communicator
node[in] YAML configuration node
Returns
PetscErrorCode

Implements petibm::misc::ProbeBase.

Definition at line 604 of file probes.cpp.

◆ 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::ProbePoint::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 662 of file probes.cpp.

Member Data Documentation

◆ 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.

◆ field

type::Field petibm::misc::ProbeBase::field
protectedinherited

Type of the field to monitor.

Definition at line 72 of file probes.h.

◆ interp

type::LinInterp petibm::misc::ProbePoint::interp
protected

Interpolating object to monitor at a single point.

Definition at line 319 of file probes.h.

◆ loc

type::RealVec1D petibm::misc::ProbePoint::loc
protected

Coordinates of the point to monitor around.

Definition at line 307 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.

◆ name

std::string petibm::misc::ProbeBase::name
protectedinherited

Name of the probe as a string.

Definition at line 66 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.

◆ pointOnLocalProc

PetscBool petibm::misc::ProbePoint::pointOnLocalProc
protected

True if target point located on local sub-domain.

Definition at line 310 of file probes.h.

◆ svec

Vec petibm::misc::ProbePoint::svec
protected

Local (ghosted) PETSc Vec object with neighboring values.

Definition at line 313 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.

◆ value

PetscReal petibm::misc::ProbePoint::value
protected

Interpolated value.

Definition at line 316 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: