PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
misc.h File Reference

Prototypes of some miscellaneous functions. More...

#include <algorithm>
#include <cmath>
#include <functional>
#include <vector>
#include <petscdmda.h>
#include <petscsys.h>
#include <petibm/mesh.h>
#include <petibm/type.h>

Go to the source code of this file.

Classes

struct  petibm::misc::LoopBound
 A helper struct to make looping function easier. More...
 

Namespaces

namespace  petibm
 A toolbox for building flow solvers.
 
namespace  petibm::misc
 A namespace holding miscellaneous functions.
 

Functions

PetscErrorCode petibm::misc::checkPeriodicBC (const type::IntVec2D &bcTypes, type::BoolVec2D &periodic)
 Check if there is any periodic boundary condition and if these periodic BCs make sense. More...
 
PetscErrorCode petibm::misc::checkBoundaryProc (const DM &da, const type::IntVec1D &n, const type::BCLoc &loc, PetscBool &onThisProc)
 Check if a boundary is on this process. More...
 
PetscErrorCode petibm::misc::getGhostPointList (const type::Mesh &mesh, const type::Field &field, const type::BCLoc &loc, type::GhostPointsList &points)
 Get a list of ghost points on a desired boundary. More...
 
PetscErrorCode petibm::misc::getPerpendAxes (const PetscInt &self, type::IntVec1D &pAxes)
 An utility to get the perpendicular axes of a desired axis. More...
 
PetscErrorCode petibm::misc::getGhostTargetStencil (const type::IntVec1D &n, const type::BCLoc &loc, const type::IntVec1D &pIdx, MatStencil &ghost, MatStencil &target)
 Get the stencils of a desired ghost point and its corresponding boundary point. More...
 
PetscErrorCode petibm::misc::stretchGrid (const PetscReal &bg, const PetscReal &ed, const PetscInt &n, const PetscReal &r, type::RealVec1D &dL)
 Calculate and return cell sizes of stretched grid in one direction. More...
 
PetscErrorCode petibm::misc::doubleLoops (const LoopBound &bound1, const LoopBound &bound2, const std::function< PetscErrorCode(const PetscInt &, const PetscInt &)> &f)
 A helper function to carry out a double loop on a given function. More...
 
PetscErrorCode petibm::misc::tripleLoops (const LoopBound &bound1, const LoopBound &bound2, const LoopBound &bound3, const std::function< PetscErrorCode(const PetscInt &, const PetscInt &, const PetscInt &)> &f)
 A helper function to carry out a triple loop on a given function. More...
 

Detailed Description

Prototypes of some miscellaneous functions.

License
BSD 3-Clause License.

Definition in file misc.h.