Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
7b9b238f
Commit
7b9b238f
authored
11 years ago
by
Van Herck, Walter
Browse files
Options
Downloads
Patches
Plain Diff
Added test_SampleGeometry() to TestMiscellaneous
parent
3525c61f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
App/inc/TestMiscellaneous.h
+3
-0
3 additions, 0 deletions
App/inc/TestMiscellaneous.h
App/src/TestMiscellaneous.cpp
+37
-3
37 additions, 3 deletions
App/src/TestMiscellaneous.cpp
with
40 additions
and
3 deletions
App/inc/TestMiscellaneous.h
+
3
−
0
View file @
7b9b238f
...
@@ -55,6 +55,9 @@ public:
...
@@ -55,6 +55,9 @@ public:
//! testing print visitor
//! testing print visitor
void
test_PrintVisitor
();
void
test_PrintVisitor
();
//! testing specific sample geometries (for debugging purposes)
void
test_SampleGeometry
();
};
};
#endif // TESTMISCELLANEOUS_H
#endif // TESTMISCELLANEOUS_H
...
...
This diff is collapsed.
Click to expand it.
App/src/TestMiscellaneous.cpp
+
37
−
3
View file @
7b9b238f
...
@@ -55,9 +55,10 @@ void TestMiscellaneous::execute()
...
@@ -55,9 +55,10 @@ void TestMiscellaneous::execute()
//test_KVectorContainer();
//test_KVectorContainer();
//test_OutputDataIOFactory();
//test_OutputDataIOFactory();
//test_FastSin();
//test_FastSin();
test_FormFactor1
();
//
test_FormFactor1();
//test_FormFactor();
//test_FormFactor();
//test_DrawMesocrystal();
//test_DrawMesocrystal();
test_SampleGeometry
();
}
}
...
@@ -271,7 +272,7 @@ void TestMiscellaneous::test_FormFactor()
...
@@ -271,7 +272,7 @@ void TestMiscellaneous::test_FormFactor()
int
iz
=
(
int
)
p_data
->
getIndexOfAxis
(
"qz"
,
it
.
getIndex
());
int
iz
=
(
int
)
p_data
->
getIndexOfAxis
(
"qz"
,
it
.
getIndex
());
cvector_t
q
(
x
,
y
,
z
);
cvector_t
q
(
x
,
y
,
z
);
cvector_t
q0
(
0
,
0
,
0
);
cvector_t
q0
(
0
.0
,
0.0
,
0.
0
);
Bin1DCVector
q0_bin
(
q0
,
q0
);
Bin1DCVector
q0_bin
(
q0
,
q0
);
Bin1D
zero_bin
=
{
0.0
,
0.0
};
Bin1D
zero_bin
=
{
0.0
,
0.0
};
double
value
=
std
::
abs
(
ff
.
evaluate
(
q
,
q0_bin
,
zero_bin
));
double
value
=
std
::
abs
(
ff
.
evaluate
(
q
,
q0_bin
,
zero_bin
));
...
@@ -384,7 +385,7 @@ void TestMiscellaneous::test_FormFactor1()
...
@@ -384,7 +385,7 @@ void TestMiscellaneous::test_FormFactor1()
double
y
=
p_data
->
getValueOfAxis
(
"qy"
,
it
.
getIndex
());
double
y
=
p_data
->
getValueOfAxis
(
"qy"
,
it
.
getIndex
());
cvector_t
q
(
x
,
y
,
z
);
cvector_t
q
(
x
,
y
,
z
);
cvector_t
q0
(
0
,
0
,
0
);
cvector_t
q0
(
0
.0
,
0.0
,
0.
0
);
Bin1DCVector
q0_bin
(
q0
,
q0
);
Bin1DCVector
q0_bin
(
q0
,
q0
);
Bin1D
zero_bin
=
{
0.0
,
0.0
};
Bin1D
zero_bin
=
{
0.0
,
0.0
};
double
value
=
std
::
abs
(
ff
.
evaluate
(
q
,
q0_bin
,
zero_bin
));
double
value
=
std
::
abs
(
ff
.
evaluate
(
q
,
q0_bin
,
zero_bin
));
...
@@ -411,3 +412,36 @@ void TestMiscellaneous::test_FormFactor1()
...
@@ -411,3 +412,36 @@ void TestMiscellaneous::test_FormFactor1()
vh2_xy
->
Draw
(
"cont4 z"
);
vh2_xy
->
Draw
(
"cont4 z"
);
c1_xy
->
Print
(
"test.eps"
);
c1_xy
->
Print
(
"test.eps"
);
}
}
void
TestMiscellaneous
::
test_SampleGeometry
()
{
MultiLayer
multi_layer
;
complex_t
n_air
(
1.0
,
0.0
);
complex_t
n_substrate
(
1.0
-
6e-6
,
2e-8
);
complex_t
n_particle
(
1.0
-
6e-4
,
2e-8
);
const
IMaterial
*
p_air_material
=
MaterialManager
::
getHomogeneousMaterial
(
"Air"
,
n_air
);
const
IMaterial
*
p_substrate_material
=
MaterialManager
::
getHomogeneousMaterial
(
"Substrate"
,
n_substrate
);
const
IMaterial
*
particle_material
=
MaterialManager
::
getHomogeneousMaterial
(
"Particle"
,
n_particle
);
Layer
air_layer
;
air_layer
.
setMaterial
(
p_air_material
);
ParticleDecoration
particle_decoration
(
new
Particle
(
particle_material
,
new
FormFactorFullSphere
(
5
*
Units
::
nanometer
)));
air_layer
.
setDecoration
(
particle_decoration
);
multi_layer
.
addLayer
(
air_layer
);
Simulation
simulation
;
simulation
.
setDetectorParameters
(
100
,
-
0.2
*
Units
::
degree
,
0.2
*
Units
::
degree
,
100
,
-
0.2
*
Units
::
degree
,
0.2
*
Units
::
degree
);
simulation
.
setBeamParameters
(
0.1
*
Units
::
nanometer
,
0.2
*
Units
::
degree
,
0.0
);
simulation
.
setSample
(
multi_layer
);
simulation
.
runSimulation
();
IsGISAXSTools
::
drawLogOutputData
(
*
simulation
.
getIntensityData
(),
"c1_geom"
,
"Sample geometry"
,
"CONT4 Z"
,
"Sample geometry"
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment