Finite Volume Solver  prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
Public Member Functions | Private Attributes | List of all members
fub::CartesianCoordinates Class Reference

This class handles uniform cartesian cell coordinates. More...

#include <CartesianCoordinates.hpp>

Public Member Functions

 CartesianCoordinates (const Eigen::Vector3d &lower, const Eigen::Vector3d &upper, const Eigen::Vector3d &dx, dynamic_extents< 3 > extents) noexcept
 This constructs a coordinate object given domain bounds, cell width and cell extents. More...
 
Eigen::Vector3d operator() (std::ptrdiff_t i, std::ptrdiff_t j=0, std::ptrdiff_t k=0) const
 Returns coordinates of the mid point of a cell in given cell indices. More...
 
Eigen::Vector3d CellCoordinates (std::ptrdiff_t i, std::ptrdiff_t j, std::ptrdiff_t k) const
 Returns coordinates of the mid point of a cell in given cell indices. More...
 
Eigen::Vector3d NodeCoordinates (std::ptrdiff_t i, std::ptrdiff_t j, std::ptrdiff_t k) const
 Returns coordinates of a nodes in given nodes indices. More...
 
const Eigen::Vector3d & dx () const noexcept
 Returns the cell width size. More...
 
const Eigen::Vector3d & GetUpper () const noexcept
 Returns the most upper node coordinates (inclusive). More...
 
const Eigen::Vector3d & GetLower () const noexcept
 Returns the lowest node coordinates (inclusive). More...
 

Private Attributes

Eigen::Vector3d lower_
 
Eigen::Vector3d upper_
 
Eigen::Vector3d dx_
 
dynamic_extents< 3 > extents_
 

Detailed Description

This class handles uniform cartesian cell coordinates.

It stores lower and upper node coordinate bounds, cell widths and cell extents. You can also compute cell and nodes coordinates with this class.

Constructor & Destructor Documentation

◆ CartesianCoordinates()

fub::CartesianCoordinates::CartesianCoordinates ( const Eigen::Vector3d &  lower,
const Eigen::Vector3d &  upper,
const Eigen::Vector3d &  dx,
dynamic_extents< 3 >  extents 
)
noexcept

This constructs a coordinate object given domain bounds, cell width and cell extents.

Parameters
[in]lowerCoordinates of lowest node.
[in]upperCoordinates of the highest node.
[in]dxWidths of cells
[in]extentsNumber of cells for all coordinate direction.

Member Function Documentation

◆ CellCoordinates()

Eigen::Vector3d fub::CartesianCoordinates::CellCoordinates ( std::ptrdiff_t  i,
std::ptrdiff_t  j,
std::ptrdiff_t  k 
) const

Returns coordinates of the mid point of a cell in given cell indices.

Parameters
[in]iThe cell index in X direction
[in]jThe cell index in Y direction
[in]kThe cell index in Z direction
Returns
A three-dimensional Eigen::Vector3d.
See also
Same as CartesianCoordinates::operator()(i, j, k)

◆ dx()

const Eigen::Vector3d& fub::CartesianCoordinates::dx ( ) const
inlinenoexcept

Returns the cell width size.

◆ GetLower()

const Eigen::Vector3d& fub::CartesianCoordinates::GetLower ( ) const
inlinenoexcept

Returns the lowest node coordinates (inclusive).

◆ GetUpper()

const Eigen::Vector3d& fub::CartesianCoordinates::GetUpper ( ) const
inlinenoexcept

Returns the most upper node coordinates (inclusive).

◆ NodeCoordinates()

Eigen::Vector3d fub::CartesianCoordinates::NodeCoordinates ( std::ptrdiff_t  i,
std::ptrdiff_t  j,
std::ptrdiff_t  k 
) const

Returns coordinates of a nodes in given nodes indices.

Parameters
[in]iThe cell index in X direction
[in]jThe cell index in Y direction
[in]kThe cell index in Z direction

◆ operator()()

Eigen::Vector3d fub::CartesianCoordinates::operator() ( std::ptrdiff_t  i,
std::ptrdiff_t  j = 0,
std::ptrdiff_t  k = 0 
) const

Returns coordinates of the mid point of a cell in given cell indices.

Parameters
[in]iThe cell index in X direction
[in]jThe cell index in Y direction
[in]kThe cell index in Z direction
See also
Same as CartesianCoordinates::CellCoordinates(i, j, k)

Member Data Documentation

◆ dx_

Eigen::Vector3d fub::CartesianCoordinates::dx_
private

◆ extents_

dynamic_extents<3> fub::CartesianCoordinates::extents_
private

◆ lower_

Eigen::Vector3d fub::CartesianCoordinates::lower_
private

◆ upper_

Eigen::Vector3d fub::CartesianCoordinates::upper_
private

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