Dear CS10-Gitlab-users, on Thursday, Feb 3 there will be maintenance. That will lead to a downtime of the CS10-Gitlab-service including Subversion and Mattermost chat from 09:30. This might take the whole day since we don't know how long it is going to take. We are sorry for the inconvenience! Best regards, CS10-Admin-Team

Commit 22d6b44f authored by Phillip Lino Rall's avatar Phillip Lino Rall
Browse files

beispiel : slice von 3dvar

parent 51060ea8
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "source/ugblock2D.h" #include "source/ugblock2D.h"
#include "source/ugblock.h" #include "ugblock.h"
#include "source/ugblock2D3D.h"
using std::complex; using std::complex;
...@@ -551,7 +552,7 @@ void estimateBeamQuality(VariableFFT& varIn, ...@@ -551,7 +552,7 @@ void estimateBeamQuality(VariableFFT& varIn,
int main(int argc, char** argv) { int main(int argc, char** argv) {
std::ofstream DATEI; std::ofstream DATEI;
int n = 10; int n = 5;
double R1 = 100; double R1 = 100;
double R2 = 100; double R2 = 100;
...@@ -579,14 +580,11 @@ int main(int argc, char** argv) { ...@@ -579,14 +580,11 @@ int main(int argc, char** argv) {
distanceFromWaist = 0; distanceFromWaist = 0;
curvature = distanceFromWaist * (1.0 + pow(rayleighrange / distanceFromWaist,2) ); curvature = distanceFromWaist * (1.0 + pow(rayleighrange / distanceFromWaist,2) );
double radiusGeo = 0.5 * geometrySize;
Rechteck geo(-radiusGeo, -radiusGeo, radiusGeo, radiusGeo);
double wavenumber = 2.0 * M_PI / lambda; double wavenumber = 2.0 * M_PI / lambda;
<<<<<<< HEAD
VTK_Reader reader()
=======
>>>>>>> bb52a7764bf2e15d580affac6e3b898abc7adc75
cout << " Test CalcFresnel!!" << endl; cout << " Test CalcFresnel!!" << endl;
...@@ -605,14 +603,23 @@ int main(int argc, char** argv) { ...@@ -605,14 +603,23 @@ int main(int argc, char** argv) {
std::cout << "deltaX initial plane (z = 0) = " << deltaX << std::endl; std::cout << "deltaX initial plane (z = 0) = " << deltaX << std::endl;
std::cout << "deltaX fourier plane (z = " <<distance<<") = " << deltaXFourierPlane << std::endl; std::cout << "deltaX fourier plane (z = " <<distance<<") = " << deltaXFourierPlane << std::endl;
std::cout << "dxInitial / dxFourier = " << deltaX / deltaXFourierPlane << std::endl; std::cout << "dxInitial / dxFourier = " << deltaX / deltaXFourierPlane << std::endl;
std::cout << "curvature " << curvature << std::endl;
double radiusGeo = 0.5 * geometrySize; //VTK_Reader reader(QString("/local/er96apow/FAUbox/Promotion/Vectorial_BPM/fibercryst_exmaple/RefractionIndexTherm_last.vtk"));
Rechteck geo(-radiusGeo, -radiusGeo, radiusGeo, radiusGeo); //Variable<double> * thermalRefractiveIndex3D = reader.give_first_variable();
std::cout << "curvature " << curvature << std::endl;
Unstructured_grid *ug = new Cylinder(2,1,20);
Blockgrid *bg = new Blockgrid(ug,10,10,20);
Variable<double> * thermalRefractiveIndex3D = new Variable<double>(*bg);
VariableFFT varSlice(n,n,geo);
Variable2D<double> varDoubleRefr(*(varSlice.Give_blockgrid()));
IteratorZDirection zIterator(thermalRefractiveIndex3D->Give_blockgrid());
zIterator.gotoFront();
thermalRefractiveIndex3D->interpolateSlizeZ(&varDoubleRefr, &zIterator);
VariableFFT varE(n,n,geo); VariableFFT varE(n,n,geo);
VariableFFT varIn(varE); VariableFFT varIn(varE);
......
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