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
9d01dec7
Commit
9d01dec7
authored
6 years ago
by
Van Herck, Walter
Browse files
Options
Downloads
Patches
Plain Diff
Add FormFactorBAPol for polarized SANS
parent
7d04dd6e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Core/Basics/BornAgainNamespace.h
+1
-0
1 addition, 0 deletions
Core/Basics/BornAgainNamespace.h
Core/Multilayer/FormFactorBAPol.cpp
+59
-0
59 additions, 0 deletions
Core/Multilayer/FormFactorBAPol.cpp
Core/Multilayer/FormFactorBAPol.h
+58
-0
58 additions, 0 deletions
Core/Multilayer/FormFactorBAPol.h
with
118 additions
and
0 deletions
Core/Basics/BornAgainNamespace.h
+
1
−
0
View file @
9d01dec7
...
...
@@ -123,6 +123,7 @@ const std::string FormFactorSphereLogNormalRadiusType = "FormFactorSphereLogNorm
const
std
::
string
FormFactorSphereUniformRadiusType
=
"FormFactorSphereUniformRadius"
;
const
std
::
string
FormFactorDWBAType
=
"FormFactorDWBA"
;
const
std
::
string
FormFactorPolarizedDWBAType
=
"FormFactorDWBAPol"
;
const
std
::
string
FormFactorPolarizedBAType
=
"FormFactorBAPol"
;
const
std
::
string
FormFactorCoreShellType
=
"FormFactorCoreShell"
;
const
std
::
string
FormFactorDecoratorPositionFactorType
=
"FormFactorDecoratorPositionFactor"
;
...
...
This diff is collapsed.
Click to expand it.
Core/Multilayer/FormFactorBAPol.cpp
0 → 100644
+
59
−
0
View file @
9d01dec7
// ************************************************************************** //
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file Core/Multilayer/FormFactorBAPol.cpp
//! @brief Defines class FormFactorBAPol.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************** //
#include
"FormFactorBAPol.h"
#include
"BornAgainNamespace.h"
#include
"WavevectorInfo.h"
#include
<stdexcept>
FormFactorBAPol
::
FormFactorBAPol
(
const
IFormFactor
&
form_factor
)
:
mP_form_factor
(
form_factor
.
clone
())
{
setName
(
BornAgain
::
FormFactorPolarizedBAType
);
}
FormFactorBAPol
::~
FormFactorBAPol
()
=
default
;
FormFactorBAPol
*
FormFactorBAPol
::
clone
()
const
{
return
new
FormFactorBAPol
(
*
mP_form_factor
);
}
complex_t
FormFactorBAPol
::
evaluate
(
const
WavevectorInfo
&
)
const
{
throw
std
::
runtime_error
(
"FormFactorBAPol::evaluate: "
"should never be called for matrix interactions"
);
}
Eigen
::
Matrix2cd
FormFactorBAPol
::
evaluatePol
(
const
WavevectorInfo
&
wavevectors
)
const
{
Eigen
::
Matrix2cd
ff_BA
=
mP_form_factor
->
evaluatePol
(
wavevectors
);
Eigen
::
Matrix2cd
result
;
result
(
0
,
0
)
=
-
ff_BA
(
1
,
0
);
result
(
0
,
1
)
=
ff_BA
(
0
,
0
);
result
(
1
,
0
)
=
-
ff_BA
(
1
,
1
);
result
(
1
,
1
)
=
ff_BA
(
0
,
1
);
return
result
;
}
double
FormFactorBAPol
::
bottomZ
(
const
IRotation
&
rotation
)
const
{
return
mP_form_factor
->
bottomZ
(
rotation
);
}
double
FormFactorBAPol
::
topZ
(
const
IRotation
&
rotation
)
const
{
return
mP_form_factor
->
topZ
(
rotation
);
}
This diff is collapsed.
Click to expand it.
Core/Multilayer/FormFactorBAPol.h
0 → 100644
+
58
−
0
View file @
9d01dec7
// ************************************************************************** //
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file Core/Multilayer/FormFactorBAPol.h
//! @brief Defines class FormFactorBAPol.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************** //
#ifndef FORMFACTORBAPOL_H
#define FORMFACTORBAPOL_H
#include
"IFormFactor.h"
#include
<memory>
//! Evaluates the matrix BA term in a polarized IFormFactor.
//! @ingroup formfactors_internal
class
FormFactorBAPol
final
:
public
IFormFactor
{
public:
FormFactorBAPol
(
const
IFormFactor
&
form_factor
);
~
FormFactorBAPol
()
override
;
FormFactorBAPol
*
clone
()
const
override
;
void
accept
(
INodeVisitor
*
visitor
)
const
override
{
visitor
->
visit
(
this
);
}
void
setAmbientMaterial
(
Material
material
)
override
{
mP_form_factor
->
setAmbientMaterial
(
std
::
move
(
material
));
}
//! Throws not-implemented exception
complex_t
evaluate
(
const
WavevectorInfo
&
wavevectors
)
const
override
;
//! Calculates and returns a polarized form factor calculation in BA
Eigen
::
Matrix2cd
evaluatePol
(
const
WavevectorInfo
&
wavevectors
)
const
override
;
double
volume
()
const
override
{
return
mP_form_factor
->
volume
();
}
double
radialExtension
()
const
override
{
return
mP_form_factor
->
radialExtension
();
}
double
bottomZ
(
const
IRotation
&
rotation
)
const
override
;
double
topZ
(
const
IRotation
&
rotation
)
const
override
;
private
:
//! The form factor for BA
std
::
unique_ptr
<
IFormFactor
>
mP_form_factor
;
};
#endif // FORMFACTORBAPOL_H
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