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
a42ed471
Commit
a42ed471
authored
2 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
Layer: use OwningVector
parent
d865a2bd
No related branches found
No related tags found
1 merge request
!1017
consequential use of OwningVector
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Sample/Multilayer/Layer.cpp
+4
-4
4 additions, 4 deletions
Sample/Multilayer/Layer.cpp
Sample/Multilayer/Layer.h
+5
-4
5 additions, 4 deletions
Sample/Multilayer/Layer.h
with
9 additions
and
8 deletions
Sample/Multilayer/Layer.cpp
+
4
−
4
View file @
a42ed471
...
@@ -42,8 +42,8 @@ Layer* Layer::clone() const
...
@@ -42,8 +42,8 @@ Layer* Layer::clone() const
std
::
vector
<
const
INode
*>
Layer
::
nodeChildren
()
const
std
::
vector
<
const
INode
*>
Layer
::
nodeChildren
()
const
{
{
std
::
vector
<
const
INode
*>
result
;
std
::
vector
<
const
INode
*>
result
;
for
(
const
auto
&
layout
:
m_layouts
)
for
(
const
auto
*
layout
:
m_layouts
)
result
.
push_back
(
layout
.
get
()
);
result
.
push_back
(
layout
);
return
result
;
return
result
;
}
}
...
@@ -55,8 +55,8 @@ void Layer::addLayout(const ParticleLayout& layout)
...
@@ -55,8 +55,8 @@ void Layer::addLayout(const ParticleLayout& layout)
std
::
vector
<
const
ParticleLayout
*>
Layer
::
layouts
()
const
std
::
vector
<
const
ParticleLayout
*>
Layer
::
layouts
()
const
{
{
std
::
vector
<
const
ParticleLayout
*>
result
;
std
::
vector
<
const
ParticleLayout
*>
result
;
for
(
const
auto
&
layout
:
m_layouts
)
for
(
const
auto
*
layout
:
m_layouts
)
result
.
push_back
(
layout
.
get
()
);
result
.
push_back
(
layout
);
return
result
;
return
result
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Sample/Multilayer/Layer.h
+
5
−
4
View file @
a42ed471
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
#define BORNAGAIN_SAMPLE_MULTILAYER_LAYER_H
#define BORNAGAIN_SAMPLE_MULTILAYER_LAYER_H
#include
"Sample/Material/Material.h"
#include
"Sample/Material/Material.h"
#include
"Base/Types/OwningVector.h"
#include
"Sample/Scattering/ISampleNode.h"
#include
"Sample/Scattering/ISampleNode.h"
class
ParticleLayout
;
class
ParticleLayout
;
...
@@ -47,10 +48,10 @@ public:
...
@@ -47,10 +48,10 @@ public:
std
::
string
validate
()
const
override
;
std
::
string
validate
()
const
override
;
private
:
private
:
Material
m_material
;
//!< material
Material
m_material
;
//!< material
R3
m_B_field
;
//!< cached value of magnetic induction
R3
m_B_field
;
//!< cached value of magnetic induction
double
m_thickness
;
//!< layer thickness in nanometers
double
m_thickness
;
//!< layer thickness in nanometers
std
::
vector
<
std
::
unique_pt
r
<
ParticleLayout
>
>
m_layouts
;
//!< independent layouts in this layer
OwningVecto
r
<
ParticleLayout
>
m_layouts
;
//!< independent layouts in this layer
unsigned
int
m_n_slices
=
1
;
//!< number of slices to create for graded layer approach
unsigned
int
m_n_slices
=
1
;
//!< number of slices to create for graded layer approach
};
};
...
...
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