Commit 5affe25d authored by Christoph Pflaum's avatar Christoph Pflaum
Browse files

idoku hinzu

parent 776c1579
...@@ -35,9 +35,12 @@ ...@@ -35,9 +35,12 @@
// 1. Interpolate from blockgrid to rectangular blockgrid // 1. Interpolate from blockgrid to rectangular blockgrid
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
/** \addtogroup InterpolationOperators **/
/* /* @{ */
/**
* Interpolation 3D:
data structure on structured grid data structure on structured grid
\verbatim
ny * * * * * * ny * * * * * *
ny-1 * + + + + * ny-1 * + + + + *
3 * + + + + * 3 * + + + + *
...@@ -45,16 +48,12 @@ ny-1 * + + + + * ...@@ -45,16 +48,12 @@ ny-1 * + + + + *
1 * + + + + * 1 * + + + + *
0 * * * * * * 0 * * * * * *
0 1 2 3 nx-1 nx 0 1 2 3 nx-1 nx
*/ \endverbatim
/***
* interpolates data from blockgrid_ to rectangular block [pWSD, pENT] * interpolates data from blockgrid_ to rectangular block [pWSD, pENT]
***/ **/
class Interpolate_on_structured_grid { class Interpolate_on_structured_grid {
public: public:
/*** /**
* preparation for interpolation * preparation for interpolation
@param nx_ number of structured grid points x-direction @param nx_ number of structured grid points x-direction
@param ny_ number of structured grid points y-direction @param ny_ number of structured grid points y-direction
...@@ -62,18 +61,18 @@ class Interpolate_on_structured_grid { ...@@ -62,18 +61,18 @@ class Interpolate_on_structured_grid {
@param pWSD Corner WSD of structured grid @param pWSD Corner WSD of structured grid
@param pENT Corner WSD of structured grid @param pENT Corner WSD of structured grid
@param blockgrid_ of unstructured grid @param blockgrid_ of unstructured grid
***/ **/
Interpolate_on_structured_grid(int nx_, int ny_, int nz_, Interpolate_on_structured_grid(int nx_, int ny_, int nz_,
D3vector pWSD, D3vector pENT, D3vector pWSD, D3vector pENT,
Blockgrid& blockgrid_); Blockgrid& blockgrid_);
Interpolate_on_structured_grid(int nx_, int ny_, int nz_, Interpolate_on_structured_grid(int nx_, int ny_, int nz_,
Blockgrid& blockgrid_); Blockgrid& blockgrid_);
~Interpolate_on_structured_grid(); ~Interpolate_on_structured_grid();
/*** /**
* interpolates from Variable u(of unstructured blockgrid) to structured data * interpolates from Variable u(of unstructured blockgrid) to structured data
@param u: Variable on unstructured blockgrid @param u: Variable on unstructured blockgrid
@param data: pointer to structured grid data i+nx*(j+ny*k) @param data: pointer to structured grid data i+nx*(j+ny*k)
***/ **/
template <class DTyp> template <class DTyp>
void interpolate(Variable<DTyp>& u, DTyp* data, DTyp defaultInterpolation); void interpolate(Variable<DTyp>& u, DTyp* data, DTyp defaultInterpolation);
public: public:
...@@ -92,7 +91,7 @@ class Interpolate_on_structured_grid { ...@@ -92,7 +91,7 @@ class Interpolate_on_structured_grid {
Blockgrid* blockgrid; Blockgrid* blockgrid;
Unstructured_grid* ug; Unstructured_grid* ug;
}; };
/* @} */
template <class DTyp> template <class DTyp>
...@@ -195,18 +194,20 @@ void Interpolate_on_structured_grid::interpolate(Variable<DTyp>& u, DTyp* data, ...@@ -195,18 +194,20 @@ void Interpolate_on_structured_grid::interpolate(Variable<DTyp>& u, DTyp* data,
// 2. Interpolate from blockgrid to blockgrid // 2. Interpolate from blockgrid to blockgrid
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
/*** /** \addtogroup InterpolationOperators **/
/* @{ */
/**
* interpolates data from blockgrid_from to blockgrid_to_ using an internal rectangular grid if size nx,ny,nz * interpolates data from blockgrid_from to blockgrid_to_ using an internal rectangular grid if size nx,ny,nz
***/ **/
class Interpolate_on_block_grid { class Interpolate_on_block_grid {
public: public:
/*** /**
* preparation for interpolation * preparation for interpolation
@param nx_ number of structured grid points x-direction @param nx_ number of structured grid points x-direction
@param ny_ number of structured grid points y-direction @param ny_ number of structured grid points y-direction
@param nz_ number of structured grid points z-direction @param nz_ number of structured grid points z-direction
@param blockgrid_ of unstructured grid @param blockgrid_ of unstructured grid
***/ **/
Interpolate_on_block_grid(int nx_, int ny_, int nz_, Interpolate_on_block_grid(int nx_, int ny_, int nz_,
Blockgrid* blockgrid_from, Blockgrid* blockgrid_to_); Blockgrid* blockgrid_from, Blockgrid* blockgrid_to_);
~Interpolate_on_block_grid(); ~Interpolate_on_block_grid();
...@@ -216,7 +217,7 @@ class Interpolate_on_block_grid { ...@@ -216,7 +217,7 @@ class Interpolate_on_block_grid {
* da U_from keine Zelle hat, dann wird * da U_from keine Zelle hat, dann wird
* defaultInterpolation * defaultInterpolation
* verwendet. * verwendet.
***/ **/
void interpolate(Variable<double>* U_from, Variable<double>* U_to, double defaultInterpolation = 0.0); void interpolate(Variable<double>* U_from, Variable<double>* U_to, double defaultInterpolation = 0.0);
double evaluate(double coord_x, double coord_y, double coord_z); double evaluate(double coord_x, double coord_y, double coord_z);
...@@ -232,7 +233,7 @@ private: ...@@ -232,7 +233,7 @@ private:
D3vector pENT; D3vector pENT;
}; };
/* @} */
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
...@@ -251,19 +252,23 @@ public: ...@@ -251,19 +252,23 @@ public:
D3vector pWSD; D3vector pWSD;
D3vector pENT; D3vector pENT;
}; };
*/
/** \addtogroup InterpolationOperators **/
/* @{ */
/**
* interpolates data from blockgrid_from to blockgrid_to_ using an internal rectangular grid if size nx,ny,nz * interpolates data from blockgrid_from to blockgrid_to_ using an internal rectangular grid if size nx,ny,nz
***/ ***/
class PointInterpolator { class PointInterpolator {
friend Interpolate_on_structured_grid; friend Interpolate_on_structured_grid;
public: public:
/*** /**
* preparation for interpolation * preparation for interpolation
@param nx_ number of structured grid points x-direction @param nx_ number of structured grid points x-direction
@param ny_ number of structured grid points y-direction @param ny_ number of structured grid points y-direction
@param nz_ number of structured grid points z-direction @param nz_ number of structured grid points z-direction
@param blockgrid_ of unstructured grid @param blockgrid_ of unstructured grid
***/ **/
PointInterpolator(int nx_, int ny_, int nz_, PointInterpolator(int nx_, int ny_, int nz_,
Variable<double>* U_from, double defaultInterpolation_ = 0.0); Variable<double>* U_from, double defaultInterpolation_ = 0.0);
...@@ -295,7 +300,7 @@ class PointInterpolator { ...@@ -295,7 +300,7 @@ class PointInterpolator {
* verwendet. * verwendet.
* @param coord_x, coord_y, coord_z, Koordinaten des Punktes * @param coord_x, coord_y, coord_z, Koordinaten des Punktes
* @return interpolierter Wert * @return interpolierter Wert
***/ **/
double evaluate(double coord_x, double coord_y, double coord_z); double evaluate(double coord_x, double coord_y, double coord_z);
std::vector<double> evaluateGradient(double coord_x, double coord_y, double coord_z); std::vector<double> evaluateGradient(double coord_x, double coord_y, double coord_z);
void smoothGrid(); void smoothGrid();
...@@ -321,7 +326,7 @@ private: ...@@ -321,7 +326,7 @@ private:
double defaultInterpolation; double defaultInterpolation;
}; };
/* @} */
//template <class DTyp> //template <class DTyp>
class Interpolate_direct { class Interpolate_direct {
......
...@@ -38,9 +38,12 @@ ...@@ -38,9 +38,12 @@
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
/** \defgroup InterpolationOperators ''Interpolation operators '' /** \defgroup InterpolationOperators ''Interpolation operators ''
* Different interpolation operators.
* Observe different data structures in 2D and 3D.
**/ **/
/* @{ */ /* @{ */
/** /**
* Interpolation 2D:
data structure on structured grid data structure on structured grid
\verbatim \verbatim
ny-1 * * * * * * ny-1 * * * * * *
...@@ -51,7 +54,7 @@ ny-1 * * * * * * ...@@ -51,7 +54,7 @@ ny-1 * * * * * *
0 * * * * * * 0 * * * * * *
0 1 2 3 nx-1 0 1 2 3 nx-1
\endverbatim \endverbatim
* interpolates data from blockgrid_ to rectangular block [pWSD, pENT] * interpolates data from blockgrid_ to rectangular block [pWS, pEN]
**/ **/
class Interpolate_on_structured_2Dgrid { class Interpolate_on_structured_2Dgrid {
public: public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment