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
31dff20e
Commit
31dff20e
authored
7 years ago
by
Yurov, Dmitry
Browse files
Options
Downloads
Patches
Plain Diff
Absorption introduced in MaterialBySLDBuilder
parent
4df195e5
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
Core/StandardSamples/MaterialBySLDBuilder.cpp
+7
-6
7 additions, 6 deletions
Core/StandardSamples/MaterialBySLDBuilder.cpp
Core/StandardSamples/MaterialBySLDBuilder.h
+10
-2
10 additions, 2 deletions
Core/StandardSamples/MaterialBySLDBuilder.h
with
17 additions
and
8 deletions
Core/StandardSamples/MaterialBySLDBuilder.cpp
+
7
−
6
View file @
31dff20e
...
...
@@ -2,12 +2,13 @@
#include
"MaterialFactoryFuncs.h"
#include
"Layer.h"
#include
"MultiLayer.h"
#include
"Units.h"
MaterialBySLDBuilder
::
MaterialBySLDBuilder
()
:
m_number_of_layers
(
10
)
,
m_si
{
4.1491e-6
,
4.99e+1
}
// [nm, nm^{-3}]
,
m_ti
{
-
3.438e-6
,
5.67e+1
}
// [nm, nm^{-3}]
,
m_ni
{
1.3e-5
,
9.15e+1
}
// [nm, nm^{-3}]
,
m_si
{
4.1491e-6
,
4.99e+1
,
0.171
*
Units
::
barn
}
// [nm, nm^{-3}
, nm^2
]
,
m_ti
{
-
3.438e-6
,
5.67e+1
,
6.09
*
Units
::
barn
*
1e+4
}
// [nm, nm^{-3}
, nm^2
]
,
m_ni
{
1.3e-5
,
9.15e+1
,
4.49
*
Units
::
barn
}
// [nm, nm^{-3}
, nm^2
]
,
m_thick_ti
(
3.0
)
// nm
,
m_thick_ni
(
7.0
)
//nm
{}
...
...
@@ -17,9 +18,9 @@ MultiLayer* MaterialBySLDBuilder::buildSample() const
std
::
unique_ptr
<
MultiLayer
>
multi_layer
(
new
MultiLayer
());
Material
vacuum_material
=
MaterialBySLD
();
Material
substrate_material
=
MaterialBy
SLD
(
"Si_substrate"
,
m_si
.
product
(),
0.0
);
Material
ni_material
=
MaterialBy
SLD
(
"Ni"
,
m_ni
.
product
(),
0.0
);
Material
ti_material
=
MaterialBy
SLD
(
"Ti"
,
m_ti
.
product
(),
0.0
);
Material
substrate_material
=
MaterialBy
AbsCX
(
"Si_substrate"
,
m_si
.
sld
(),
m_si
.
abs_term
()
);
Material
ni_material
=
MaterialBy
AbsCX
(
"Ni"
,
m_ni
.
sld
(),
m_ni
.
abs_term
()
);
Material
ti_material
=
MaterialBy
AbsCX
(
"Ti"
,
m_ti
.
sld
(),
m_ti
.
abs_term
()
);
Layer
vacuum_layer
(
vacuum_material
,
0
);
Layer
ni_layer
(
ni_material
,
m_thick_ni
);
...
...
This diff is collapsed.
Click to expand it.
Core/StandardSamples/MaterialBySLDBuilder.h
+
10
−
2
View file @
31dff20e
...
...
@@ -20,7 +20,7 @@
//! Builds a sample with 10 interchanging homogeneous layers of Ti and Ni on silicone substrate.
//! Ti is 70 angstroms thick, Ni is 30 angstroms thick.
//!
As opposed to HomogeneousMultilayerBuilder, uses MaterialBySLD. No absorption, no roughness.
//!
Titanium absorption coefficient is exaggerated 10^4 times for its effect to be noticeable
//! @ingroup standard_samples
class
BA_CORE_API_
MaterialBySLDBuilder
:
public
IMultiLayerBuilder
...
...
@@ -31,12 +31,20 @@ public:
protected:
struct
MaterialData
{
double
product
()
const
double
sld
()
const
{
return
density
*
scat_length
;
}
//! Returns macroscopic cross-section for 2200 m/s neutrons
double
abs_term
()
const
{
return
density
*
abs_cx
;
}
double
scat_length
;
//!< bound coherent scattering length
double
density
;
//!< number density
double
abs_cx
;
//!< absorption cross-section for 2200 m/s neutrons
};
size_t
m_number_of_layers
;
MaterialData
m_si
;
...
...
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