managing a stretched zone in Cartesian meshes
More...
#include <stretchZone.h>
|
| | stretchZone (double startAt, double endtAt, double factor, double refCellSize, std::string refCellPos) |
| | Stretched zone constructor.
|
| virtual | ~stretchZone () |
| int | stretching (std::vector< double > &dX, std::vector< double > &posX) |
| const int & | getNumberCells () const |
|
| double | m_startAt |
| | zone starting position along corresponding axis
|
| double | m_endAt |
| | zone ending position along corresponding axis
|
| double | m_factor |
| | stretching factor (1. is no stretching)
|
| double | m_refCellSize |
| | size of reference cell
|
| int | m_numberCells |
| | number of cells in the stretched zone
|
| std::string | m_refCellPos |
| | position of reference cell (start or end)
|
managing a stretched zone in Cartesian meshes
◆ stretchZone()
| stretchZone::stretchZone |
( |
double | startAt, |
|
|
double | endtAt, |
|
|
double | factor, |
|
|
double | refCellSize, |
|
|
std::string | refCellPos ) |
Stretched zone constructor.
Stretched zone constructor: compute number of cells from mesh stretching area size,
- Parameters
-
| startAt | position of beginning of mesh stretching area |
| endAt | position of end of mesh stretching area |
| factor | mesh stretching factor: 1. means no stretching, value lower than 1. means mesh shrinking |
| refCellSize | size of reference cell to which mesh stretching factor is applied |
| refCellPos | position of the reference cell ('end' or 'start') |
Recall:
- geometric sequence is defined by:
- \( u_{n+1} = u_n * q \)
- \( u_n = u_0 * q^n \)
- the sum is given by: \( sum_{k = 0}^{n} u_k = u_0 (1 - q^{n+1}) / (1 - q) \)
- If we note l the length of the stretching area, we want:
- \( u_0 = l = S_0 \) when we have only 1 cell in the stretching area.
- i.e., \( Nc = n+1 \), with Nc the number of cells in the stretching area.
- and \( l = S_{Nc-1} \).
In consequence, we have \( Nc = \frac{ ln(1-(1-q)*l/u_0) }{ ln(q) } \).
◆ ~stretchZone()
| stretchZone::~stretchZone |
( |
| ) |
|
|
virtual |
◆ factorCorrection()
| void stretchZone::factorCorrection |
( |
double | l | ) |
|
|
private |
◆ getNumberCells()
| const int & stretchZone::getNumberCells |
( |
| ) |
const |
|
inline |
◆ safe_round_to_int32()
| int32_t stretchZone::safe_round_to_int32 |
( |
double | x | ) |
const |
|
private |
◆ stretching()
| int stretchZone::stretching |
( |
std::vector< double > & | dX, |
|
|
std::vector< double > & | posX ) |
◆ verifyStretching()
| int stretchZone::verifyStretching |
( |
std::vector< stretchZone > & | tabStretch, |
|
|
const double | l, |
|
|
std::string | fileName = "" ) |
|
static |
◆ m_endAt
| double stretchZone::m_endAt |
|
private |
zone ending position along corresponding axis
◆ m_factor
| double stretchZone::m_factor |
|
private |
stretching factor (1. is no stretching)
◆ m_numberCells
| int stretchZone::m_numberCells |
|
private |
number of cells in the stretched zone
◆ m_refCellPos
| std::string stretchZone::m_refCellPos |
|
private |
position of reference cell (start or end)
◆ m_refCellSize
| double stretchZone::m_refCellSize |
|
private |
◆ m_startAt
| double stretchZone::m_startAt |
|
private |
zone starting position along corresponding axis
The documentation for this class was generated from the following files: