Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Phillip Lino Rall
UGBlocks_V3
Commits
5affe25d
Commit
5affe25d
authored
May 24, 2020
by
Christoph Pflaum
Browse files
idoku hinzu
parent
776c1579
Changes
2
Hide whitespace changes
Inline
Side-by-side
program/source/interpol/interpol.h
View file @
5affe25d
...
...
@@ -35,9 +35,12 @@
// 1. Interpolate from blockgrid to rectangular blockgrid
/////////////////////////////////////////////////////////////
/*
/** \addtogroup InterpolationOperators **/
/* @{ */
/**
* Interpolation 3D:
data structure on structured grid
\verbatim
ny * * * * * *
ny-1 * + + + + *
3 * + + + + *
...
...
@@ -45,16 +48,12 @@ ny-1 * + + + + *
1 * + + + + *
0 * * * * * *
0 1 2 3 nx-1 nx
*/
/***
\endverbatim
* interpolates data from blockgrid_ to rectangular block [pWSD, pENT]
**
*
/
**/
class
Interpolate_on_structured_grid
{
public:
/**
*
/**
* preparation for interpolation
@param nx_ number of structured grid points x-direction
@param ny_ number of structured grid points y-direction
...
...
@@ -62,18 +61,18 @@ class Interpolate_on_structured_grid {
@param pWSD Corner WSD of structured grid
@param pENT Corner WSD of structured grid
@param blockgrid_ of unstructured grid
**
*
/
**/
Interpolate_on_structured_grid
(
int
nx_
,
int
ny_
,
int
nz_
,
D3vector
pWSD
,
D3vector
pENT
,
Blockgrid
&
blockgrid_
);
Interpolate_on_structured_grid
(
int
nx_
,
int
ny_
,
int
nz_
,
Blockgrid
&
blockgrid_
);
~
Interpolate_on_structured_grid
();
/**
*
/**
* interpolates from Variable u(of unstructured blockgrid) to structured data
@param u: Variable on unstructured blockgrid
@param data: pointer to structured grid data i+nx*(j+ny*k)
**
*
/
**/
template
<
class
DTyp
>
void
interpolate
(
Variable
<
DTyp
>&
u
,
DTyp
*
data
,
DTyp
defaultInterpolation
);
public:
...
...
@@ -92,7 +91,7 @@ class Interpolate_on_structured_grid {
Blockgrid
*
blockgrid
;
Unstructured_grid
*
ug
;
};
/* @} */
template
<
class
DTyp
>
...
...
@@ -195,18 +194,20 @@ void Interpolate_on_structured_grid::interpolate(Variable<DTyp>& u, DTyp* data,
// 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
**
*
/
**/
class
Interpolate_on_block_grid
{
public:
/**
*
/**
* preparation for interpolation
@param nx_ number of structured grid points x-direction
@param ny_ number of structured grid points y-direction
@param nz_ number of structured grid points z-direction
@param blockgrid_ of unstructured grid
**
*
/
**/
Interpolate_on_block_grid
(
int
nx_
,
int
ny_
,
int
nz_
,
Blockgrid
*
blockgrid_from
,
Blockgrid
*
blockgrid_to_
);
~
Interpolate_on_block_grid
();
...
...
@@ -216,7 +217,7 @@ class Interpolate_on_block_grid {
* da U_from keine Zelle hat, dann wird
* defaultInterpolation
* verwendet.
**
*
/
**/
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
);
...
...
@@ -232,7 +233,7 @@ private:
D3vector
pENT
;
};
/* @} */
/////////////////////////////////////////////////////////////
...
...
@@ -251,19 +252,23 @@ public:
D3vector pWSD;
D3vector pENT;
};
*/
/** \addtogroup InterpolationOperators **/
/* @{ */
/**
* interpolates data from blockgrid_from to blockgrid_to_ using an internal rectangular grid if size nx,ny,nz
***/
class
PointInterpolator
{
friend
Interpolate_on_structured_grid
;
public:
/**
*
/**
* preparation for interpolation
@param nx_ number of structured grid points x-direction
@param ny_ number of structured grid points y-direction
@param nz_ number of structured grid points z-direction
@param blockgrid_ of unstructured grid
**
*
/
**/
PointInterpolator
(
int
nx_
,
int
ny_
,
int
nz_
,
Variable
<
double
>*
U_from
,
double
defaultInterpolation_
=
0.0
);
...
...
@@ -295,7 +300,7 @@ class PointInterpolator {
* verwendet.
* @param coord_x, coord_y, coord_z, Koordinaten des Punktes
* @return interpolierter Wert
**
*
/
**/
double
evaluate
(
double
coord_x
,
double
coord_y
,
double
coord_z
);
std
::
vector
<
double
>
evaluateGradient
(
double
coord_x
,
double
coord_y
,
double
coord_z
);
void
smoothGrid
();
...
...
@@ -321,7 +326,7 @@ private:
double
defaultInterpolation
;
};
/* @} */
//template <class DTyp>
class
Interpolate_direct
{
...
...
program2D/source/interpol/interpolTwoD.h
View file @
5affe25d
...
...
@@ -38,9 +38,12 @@
/////////////////////////////////////////////////////////////
/** \defgroup InterpolationOperators ''Interpolation operators ''
* Different interpolation operators.
* Observe different data structures in 2D and 3D.
**/
/* @{ */
/**
* Interpolation 2D:
data structure on structured grid
\verbatim
ny-1 * * * * * *
...
...
@@ -51,7 +54,7 @@ ny-1 * * * * * *
0 * * * * * *
0 1 2 3 nx-1
\endverbatim
* interpolates data from blockgrid_ to rectangular block [pWS
D
, pEN
T
]
* interpolates data from blockgrid_ to rectangular block [pWS, pEN]
**/
class
Interpolate_on_structured_2Dgrid
{
public:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment