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

Class to perform a bilinear interpolation at a point in a 3D domain. More...

#include <lininterp.h>

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

Public Member Functions

 BiLinInterp (const MPI_Comm &comm, const type::RealVec1D &point, const type::Mesh &mesh, const type::Field &field)
 Constructor. Initialize the linear interpolation object. More...
 
 ~BiLinInterp ()=default
 Default destructor. More...
 
PetscErrorCode interpolate (const DM &da, const Vec &vec, PetscReal &v)
 
PetscErrorCode destroy ()
 Manually destroy data in the object. More...
 

Protected Member Functions

PetscErrorCode init (const MPI_Comm &comm, const type::RealVec1D &point, const type::Mesh &mesh, const type::Field &field)
 Initialize the linear interpolation object. More...
 
PetscErrorCode getBLGridlineIndices (const type::Mesh &mesh, const type::Field &field)
 Get the gridline indices of the front-bottom-left neighbor. More...
 
PetscErrorCode getBoxCoords (const type::Mesh &mesh, const type::Field &field)
 Get the coordinates of the neighbors. More...
 

Protected Attributes

type::RealVec1D target
 Coordinates of the point to interpolate. More...
 
type::RealVec1D bl
 Coordinates of the front-bottom-left neighbor. More...
 
type::RealVec1D tr
 Coordinates of the back-top-right neighbor. More...
 
type::IntVec1D idxDirs
 Gridline indices of the front-bottom-left neighbor. More...
 
MPI_Comm comm
 MPI communicator. More...
 
PetscMPIInt commSize
 Size of the MPI communicator. More...
 
PetscMPIInt commRank
 Rank of the local process in the communicator. More...
 

Detailed Description

Class to perform a bilinear interpolation at a point in a 3D domain.

See also
Miscellaneous functions, petibm::type::LinInterp, petibm::misc::createLinInterp

Definition at line 137 of file lininterp.h.

Constructor & Destructor Documentation

◆ BiLinInterp()

petibm::misc::BiLinInterp::BiLinInterp ( const MPI_Comm &  comm,
const type::RealVec1D point,
const type::Mesh mesh,
const type::Field field 
)

Constructor. Initialize the linear interpolation object.

Parameters
comm[in] MPI communicator
point[in] Coordinates of the target point to interpolate
mesh[in] Cartesian mesh object
field[in] Index of the field to monitor
Returns
PetscErrorCode

Definition at line 178 of file lininterp.cpp.

◆ ~BiLinInterp()

petibm::misc::BiLinInterp::~BiLinInterp ( )
default

Default destructor.

Member Function Documentation

◆ destroy()

PetscErrorCode petibm::misc::LinInterpBase::destroy ( )
inherited

Manually destroy data in the object.

Definition at line 59 of file lininterp.cpp.

◆ getBLGridlineIndices()

PetscErrorCode petibm::misc::LinInterpBase::getBLGridlineIndices ( const type::Mesh mesh,
const type::Field field 
)
protectedinherited

Get the gridline indices of the front-bottom-left neighbor.

Parameters
mesh[in] Cartesian mesh object
field[in] Index of the field to monitor
Returns
PetscErrorCode

Definition at line 94 of file lininterp.cpp.

◆ getBoxCoords()

PetscErrorCode petibm::misc::LinInterpBase::getBoxCoords ( const type::Mesh mesh,
const type::Field field 
)
protectedinherited

Get the coordinates of the neighbors.

Parameters
mesh[in] Cartesian mesh object
field[in] Index of the field to monitor
Returns
PetscErrorCode

Definition at line 112 of file lininterp.cpp.

◆ init()

PetscErrorCode petibm::misc::LinInterpBase::init ( const MPI_Comm &  comm,
const type::RealVec1D point,
const type::Mesh mesh,
const type::Field field 
)
protectedinherited

Initialize the linear interpolation object.

Parameters
comm[in] MPI communicator
point[in] Coordinates of the target point to interpolate
mesh[in] Cartesian mesh object
field[in] Index of the field to monitor
Returns
PetscErrorCode

Definition at line 70 of file lininterp.cpp.

◆ interpolate()

PetscErrorCode petibm::misc::BiLinInterp::interpolate ( const DM &  da,
const Vec &  vec,
PetscReal &  v 
)
virtual

copydoc LinInterpBase::interpolate()

Implements petibm::misc::LinInterpBase.

Definition at line 187 of file lininterp.cpp.

Member Data Documentation

◆ bl

type::RealVec1D petibm::misc::LinInterpBase::bl
protectedinherited

Coordinates of the front-bottom-left neighbor.

Definition at line 53 of file lininterp.h.

◆ comm

MPI_Comm petibm::misc::LinInterpBase::comm
protectedinherited

MPI communicator.

Definition at line 62 of file lininterp.h.

◆ commRank

PetscMPIInt petibm::misc::LinInterpBase::commRank
protectedinherited

Rank of the local process in the communicator.

Definition at line 68 of file lininterp.h.

◆ commSize

PetscMPIInt petibm::misc::LinInterpBase::commSize
protectedinherited

Size of the MPI communicator.

Definition at line 65 of file lininterp.h.

◆ idxDirs

type::IntVec1D petibm::misc::LinInterpBase::idxDirs
protectedinherited

Gridline indices of the front-bottom-left neighbor.

Definition at line 59 of file lininterp.h.

◆ target

type::RealVec1D petibm::misc::LinInterpBase::target
protectedinherited

Coordinates of the point to interpolate.

Definition at line 50 of file lininterp.h.

◆ tr

type::RealVec1D petibm::misc::LinInterpBase::tr
protectedinherited

Coordinates of the back-top-right neighbor.

Definition at line 56 of file lininterp.h.


The documentation for this class was generated from the following files: