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
5d8288cb
Commit
5d8288cb
authored
3 years ago
by
Matthias Puchner
Browse files
Options
Downloads
Patches
Plain Diff
handle inconsistent naming of formfactors for python code generation
parent
37e74c45
No related branches found
No related tags found
1 merge request
!65
Refactor Distribution Handling
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Sample/Scattering/IFormFactor.cpp
+7
-1
7 additions, 1 deletion
Sample/Scattering/IFormFactor.cpp
Sample/Scattering/IFormFactor.h
+1
-1
1 addition, 1 deletion
Sample/Scattering/IFormFactor.h
with
8 additions
and
2 deletions
Sample/Scattering/IFormFactor.cpp
+
7
−
1
View file @
5d8288cb
...
...
@@ -13,6 +13,7 @@
// ************************************************************************************************
#include
"Sample/Scattering/IFormFactor.h"
#include
"Base/Utils/StringUtils.h"
#include
"Param/Base/RealParameter.h"
#include
"Sample/Material/WavevectorInfo.h"
#include
"Sample/RT/ILayerRTCoefficients.h"
...
...
@@ -78,7 +79,12 @@ Eigen::Matrix2cd IFormFactor::evaluatePol(const WavevectorInfo&) const
std
::
string
IFormFactor
::
pythonConstructor
()
const
{
return
"FormFactor"
+
getName
()
+
"("
+
RealParameter
::
asPythonArgumentList
(
m_params
)
+
")"
;
// #bapool + check whether the following should be changed
// Some formfactor names (returned by getName()) are named in a different way than others: They
// are prepended by "FormFactor", the others aren't.
return
(
StringUtils
::
startsWith
(
getName
(),
"FormFactor"
)
?
""
:
"FormFactor"
)
+
getName
()
+
"("
+
RealParameter
::
asPythonArgumentList
(
m_params
)
+
")"
;
}
double
IFormFactor
::
volume
()
const
...
...
This diff is collapsed.
Click to expand it.
Sample/Scattering/IFormFactor.h
+
1
−
1
View file @
5d8288cb
...
...
@@ -57,7 +57,7 @@ public:
virtual
Eigen
::
Matrix2cd
evaluatePol
(
const
WavevectorInfo
&
wavevectors
)
const
;
//! Creates the Python constructor of this class (or derived classes)
std
::
string
pythonConstructor
()
const
;
virtual
std
::
string
pythonConstructor
()
const
;
#endif
//! Returns the total volume of the particle of this form factor's shape
...
...
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