Commit 3c798d08 authored by Phillip Lino Rall's avatar Phillip Lino Rall
Browse files

interpolator improved

parent 441875d8
......@@ -25,6 +25,7 @@
#include "../grid/elements.h"
#include "../grid/parti.h"
#include "../grid/ug.h"
#include "../grid/examples_ug.h"
#include "../grid/blockgrid.h"
#include "../grid/marker.h"
#include "../extemp/extemp.h"
......@@ -1472,6 +1473,8 @@ void PointInterpolator::normToNumberOfWritings()
}
}
void PointInterpolator::writeOnInterpolatedGrid(double coord_x, double coord_y, double coord_z, double value)
{
coord_x-=shiftx;
......@@ -4168,13 +4171,21 @@ Interpolate_on_block_grid_from_pointinterpolator::~Interpolate_on_block_grid_fro
delete[] data;
}
void Interpolate_on_block_grid_from_pointinterpolator::interpolate(Variable<double> *U_to, double defaultInterpolation)
void Interpolate_on_block_grid_from_pointinterpolator::interpolate(Variable<double> *U_to, Boundary_Marker *marker)
{
Functor3<double,double,PointInterpolator> myFunctor(pointInterpolator);
X_coordinate Xc(*blockgrid_to);
Y_coordinate Yc(*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);
}
......@@ -221,7 +221,7 @@ public:
Interpolate_on_block_grid_from_pointinterpolator(PointInterpolator *interp, Blockgrid* blockgrid_to_ );
~Interpolate_on_block_grid_from_pointinterpolator();
void interpolate(Variable<double>* U_to, double defaultInterpolation = 0.0);
void interpolate(Variable<double>* U_to, Boundary_Marker *marker = NULL);
double evaluate(double coord_x, double coord_y, double coord_z);
......@@ -349,7 +349,7 @@ class PointInterpolator {
std::vector<double> evaluateGradient(double coord_x, double coord_y, double coord_z);
void smoothGrid();
void resetInterpolator();
void normToNumberOfWritings();
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);
......@@ -358,17 +358,18 @@ class PointInterpolator {
void QPrint_VTK(QString DateiName);
D3vector pWSD;
D3vector pENT;
int nx, ny, nz;
double hx, hy, hz;
private:
double shiftx{0}, shifty{0}, shiftz{0};
double rotationx{0}, rotationy{0}, rotationz{0};
int nx, ny, nz;
double hx, hy, hz;
Interpolate_on_structured_grid* interpolatorStructured;
double* data;
int* dataCounter;
D3vector pWSD;
D3vector pENT;
double defaultInterpolation;
......
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