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
1b9e25b8
Commit
1b9e25b8
authored
7 years ago
by
Yurov, Dmitry
Browse files
Options
Downloads
Patches
Plain Diff
Add wavelength parameter to refractiveIndex functions
Redmine: #1858
parent
f80e0948
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Core/Material/HomogeneousMaterial.cpp
+3
-4
3 additions, 4 deletions
Core/Material/HomogeneousMaterial.cpp
Core/Material/HomogeneousMaterial.h
+2
-2
2 additions, 2 deletions
Core/Material/HomogeneousMaterial.h
with
5 additions
and
6 deletions
Core/Material/HomogeneousMaterial.cpp
+
3
−
4
View file @
1b9e25b8
...
...
@@ -72,12 +72,12 @@ HomogeneousMaterial HomogeneousMaterial::inverted() const
return
result
;
}
complex_t
HomogeneousMaterial
::
refractiveIndex
()
const
complex_t
HomogeneousMaterial
::
refractiveIndex
(
double
)
const
{
return
m_refractive_index
;
}
complex_t
HomogeneousMaterial
::
refractiveIndex2
()
const
complex_t
HomogeneousMaterial
::
refractiveIndex2
(
double
)
const
{
return
m_refractive_index
*
m_refractive_index
;
}
...
...
@@ -96,8 +96,7 @@ complex_t HomogeneousMaterial::scalarSubtrSLD(const WavevectorInfo& wavevectors)
{
double
wavelength
=
wavevectors
.
getWavelength
();
double
prefactor
=
M_PI
/
wavelength
/
wavelength
;
complex_t
refractive_index
=
refractiveIndex
();
return
prefactor
*
refractive_index
*
refractive_index
;
return
prefactor
*
refractiveIndex2
(
wavelength
);
}
Eigen
::
Matrix2cd
HomogeneousMaterial
::
polarizedSubtrSLD
(
const
WavevectorInfo
&
wavevectors
)
const
...
...
This diff is collapsed.
Click to expand it.
Core/Material/HomogeneousMaterial.h
+
2
−
2
View file @
1b9e25b8
...
...
@@ -47,8 +47,8 @@ public:
//! Constructs a material with inverted magnetization
HomogeneousMaterial
inverted
()
const
;
complex_t
refractiveIndex
()
const
;
complex_t
refractiveIndex2
()
const
;
complex_t
refractiveIndex
(
double
wavelength
)
const
;
complex_t
refractiveIndex2
(
double
wavelength
)
const
;
//! Indicates whether the interaction with the material is scalar.
//! This means that different polarization states will be diffracted equally
...
...
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