Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
3c798d08
Commit
3c798d08
authored
Oct 09, 2020
by
Phillip Lino Rall
Browse files
interpolator improved
parent
441875d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
program/source/interpol/interpol.cc
View file @
3c798d08
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "../grid/elements.h"
#include "../grid/elements.h"
#include "../grid/parti.h"
#include "../grid/parti.h"
#include "../grid/ug.h"
#include "../grid/ug.h"
#include "../grid/examples_ug.h"
#include "../grid/blockgrid.h"
#include "../grid/blockgrid.h"
#include "../grid/marker.h"
#include "../grid/marker.h"
#include "../extemp/extemp.h"
#include "../extemp/extemp.h"
...
@@ -1472,6 +1473,8 @@ void PointInterpolator::normToNumberOfWritings()
...
@@ -1472,6 +1473,8 @@ void PointInterpolator::normToNumberOfWritings()
}
}
}
}
void
PointInterpolator
::
writeOnInterpolatedGrid
(
double
coord_x
,
double
coord_y
,
double
coord_z
,
double
value
)
void
PointInterpolator
::
writeOnInterpolatedGrid
(
double
coord_x
,
double
coord_y
,
double
coord_z
,
double
value
)
{
{
coord_x
-=
shiftx
;
coord_x
-=
shiftx
;
...
@@ -4168,13 +4171,21 @@ Interpolate_on_block_grid_from_pointinterpolator::~Interpolate_on_block_grid_fro
...
@@ -4168,13 +4171,21 @@ Interpolate_on_block_grid_from_pointinterpolator::~Interpolate_on_block_grid_fro
delete
[]
data
;
delete
[]
data
;
}
}
void
Interpolate_on_block_grid_from_pointinterpolator
::
interpolate
(
Variable
<
double
>
*
U_to
,
d
ou
ble
defaultInterpolation
)
void
Interpolate_on_block_grid_from_pointinterpolator
::
interpolate
(
Variable
<
double
>
*
U_to
,
B
ou
ndary_Marker
*
marker
)
{
{
Functor3
<
double
,
double
,
PointInterpolator
>
myFunctor
(
pointInterpolator
);
Functor3
<
double
,
double
,
PointInterpolator
>
myFunctor
(
pointInterpolator
);
X_coordinate
Xc
(
*
blockgrid_to
);
X_coordinate
Xc
(
*
blockgrid_to
);
Y_coordinate
Yc
(
*
blockgrid_to
);
Y_coordinate
Yc
(
*
blockgrid_to
);
Z_coordinate
Zc
(
*
blockgrid_to
);
Z_coordinate
Zc
(
*
blockgrid_to
);
if
(
marker
==
NULL
)
{
(
*
U_to
)
=
myFunctor
(
Xc
,
Yc
,
Zc
);
}
else
{
(
*
U_to
)
=
myFunctor
(
Xc
,
Yc
,
Zc
)
|
*
marker
;
}
(
*
U_to
)
=
myFunctor
(
Xc
,
Yc
,
Zc
);
}
}
program/source/interpol/interpol.h
View file @
3c798d08
...
@@ -221,7 +221,7 @@ public:
...
@@ -221,7 +221,7 @@ public:
Interpolate_on_block_grid_from_pointinterpolator
(
PointInterpolator
*
interp
,
Blockgrid
*
blockgrid_to_
);
Interpolate_on_block_grid_from_pointinterpolator
(
PointInterpolator
*
interp
,
Blockgrid
*
blockgrid_to_
);
~
Interpolate_on_block_grid_from_pointinterpolator
();
~
Interpolate_on_block_grid_from_pointinterpolator
();
void
interpolate
(
Variable
<
double
>*
U_to
,
d
ou
ble
defaultInterpolation
=
0.0
);
void
interpolate
(
Variable
<
double
>*
U_to
,
B
ou
ndary_Marker
*
marker
=
NULL
);
double
evaluate
(
double
coord_x
,
double
coord_y
,
double
coord_z
);
double
evaluate
(
double
coord_x
,
double
coord_y
,
double
coord_z
);
...
@@ -349,7 +349,7 @@ class PointInterpolator {
...
@@ -349,7 +349,7 @@ class PointInterpolator {
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
();
void
resetInterpolator
();
void
resetInterpolator
();
void
normToNumberOfWritings
();
void
normToNumberOfWritings
();
void
writeOnInterpolatedGrid
(
double
coord_x
,
double
coord_y
,
double
coord_z
,
double
value
);
void
writeOnInterpolatedGrid
(
double
coord_x
,
double
coord_y
,
double
coord_z
,
double
value
);
void
subtractOnInterpolatedGrid
(
double
coord_x
,
double
coord_y
,
double
coord_z
,
double
value
);
void
subtractOnInterpolatedGrid
(
double
coord_x
,
double
coord_y
,
double
coord_z
,
double
value
);
...
@@ -358,17 +358,18 @@ class PointInterpolator {
...
@@ -358,17 +358,18 @@ class PointInterpolator {
void
QPrint_VTK
(
QString
DateiName
);
void
QPrint_VTK
(
QString
DateiName
);
D3vector
pWSD
;
D3vector
pENT
;
int
nx
,
ny
,
nz
;
double
hx
,
hy
,
hz
;
private:
private:
double
shiftx
{
0
},
shifty
{
0
},
shiftz
{
0
};
double
shiftx
{
0
},
shifty
{
0
},
shiftz
{
0
};
double
rotationx
{
0
},
rotationy
{
0
},
rotationz
{
0
};
double
rotationx
{
0
},
rotationy
{
0
},
rotationz
{
0
};
int
nx
,
ny
,
nz
;
double
hx
,
hy
,
hz
;
Interpolate_on_structured_grid
*
interpolatorStructured
;
Interpolate_on_structured_grid
*
interpolatorStructured
;
double
*
data
;
double
*
data
;
int
*
dataCounter
;
int
*
dataCounter
;
D3vector
pWSD
;
D3vector
pENT
;
double
defaultInterpolation
;
double
defaultInterpolation
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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