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
70b418f8
Commit
70b418f8
authored
3 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
sort member fcts
parent
f7206401
No related branches found
No related tags found
1 merge request
!531
cleanup and simplify IParticle and subclasses; rename INode fcts
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Sample/Particle/IParticle.h
+1
-0
1 addition, 0 deletions
Sample/Particle/IParticle.h
Sample/Particle/Particle.cpp
+7
-7
7 additions, 7 deletions
Sample/Particle/Particle.cpp
Sample/Particle/Particle.h
+4
-6
4 additions, 6 deletions
Sample/Particle/Particle.h
with
12 additions
and
13 deletions
Sample/Particle/IParticle.h
+
1
−
0
View file @
70b418f8
...
...
@@ -35,6 +35,7 @@ class IRotation;
class
IParticle
:
public
ISampleNode
{
public:
~
IParticle
()
override
;
IParticle
*
clone
()
const
override
=
0
;
//! Creates a form factor for this particle
...
...
This diff is collapsed.
Click to expand it.
Sample/Particle/Particle.cpp
+
7
−
7
View file @
70b418f8
...
...
@@ -21,8 +21,6 @@
#include
"Sample/Scattering/FormFactorDecoratorPositionFactor.h"
#include
"Sample/Scattering/Rotations.h"
Particle
::~
Particle
()
=
default
;
Particle
::
Particle
(
Material
material
,
const
IFormFactor
&
form_factor
)
:
m_material
(
std
::
move
(
material
)),
m_form_factor
(
form_factor
.
clone
())
{
...
...
@@ -34,6 +32,8 @@ Particle::Particle(Material material, const IFormFactor& form_factor, const IRot
setRotation
(
rotation
);
}
Particle
::~
Particle
()
=
default
;
Particle
*
Particle
::
clone
()
const
{
ASSERT
(
m_form_factor
);
...
...
@@ -46,6 +46,11 @@ Particle* Particle::clone() const
return
p_result
;
}
std
::
vector
<
const
INode
*>
Particle
::
nodeChildren
()
const
{
return
std
::
vector
<
const
INode
*>
()
<<
IParticle
::
nodeChildren
()
<<
m_form_factor
;
}
SlicedParticle
Particle
::
createSlicedParticle
(
const
ZLimits
&
limits
)
const
{
ASSERT
(
m_form_factor
);
...
...
@@ -60,8 +65,3 @@ SlicedParticle Particle::createSlicedParticle(const ZLimits& limits) const
sliced_ff
->
setMaterial
(
transformed_material
);
return
{
std
::
move
(
sliced_ff
),
{{{
volume
,
transformed_material
}}}};
}
std
::
vector
<
const
INode
*>
Particle
::
nodeChildren
()
const
{
return
std
::
vector
<
const
INode
*>
()
<<
IParticle
::
nodeChildren
()
<<
m_form_factor
;
}
This diff is collapsed.
Click to expand it.
Sample/Particle/Particle.h
+
4
−
6
View file @
70b418f8
...
...
@@ -23,22 +23,20 @@
class
Particle
:
public
IParticle
{
public:
std
::
string
className
()
const
override
{
return
"Particle"
;
}
Particle
(
Material
material
,
const
IFormFactor
&
form_factor
);
Particle
(
Material
material
,
const
IFormFactor
&
form_factor
,
const
IRotation
&
rotation
);
~
Particle
()
override
;
Particle
*
clone
()
const
override
;
SlicedParticle
createSlicedParticle
(
const
ZLimits
&
limits
)
const
override
;
std
::
string
className
()
const
override
{
return
"Particle"
;
}
std
::
vector
<
const
INode
*>
nodeChildren
(
)
const
override
;
const
Material
*
material
()
const
override
{
return
&
m_material
;
}
std
::
vector
<
const
INode
*>
nodeChildren
()
const
override
;
const
IFormFactor
*
formFactor
()
const
{
return
m_form_factor
.
get
();
}
SlicedParticle
createSlicedParticle
(
const
ZLimits
&
limits
)
const
override
;
private
:
const
Material
m_material
;
std
::
unique_ptr
<
const
IFormFactor
>
m_form_factor
;
...
...
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