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
a9b2b12a
Commit
a9b2b12a
authored
4 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
Export to Python: uniform small caps in comments
parent
0b348b28
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Core/Export/SampleToPython.cpp
+10
-10
10 additions, 10 deletions
Core/Export/SampleToPython.cpp
with
10 additions
and
10 deletions
Core/Export/SampleToPython.cpp
+
10
−
10
View file @
a9b2b12a
...
@@ -102,10 +102,10 @@ std::string SampleToPython::defineMaterials() const
...
@@ -102,10 +102,10 @@ std::string SampleToPython::defineMaterials() const
{
{
const
LabelMap
<
const
Material
*>*
themap
=
m_label
->
materialMap
();
const
LabelMap
<
const
Material
*>*
themap
=
m_label
->
materialMap
();
if
(
themap
->
empty
())
if
(
themap
->
empty
())
return
"# No
M
aterials.
\n\n
"
;
return
"# No
m
aterials.
\n\n
"
;
std
::
ostringstream
result
;
std
::
ostringstream
result
;
result
<<
std
::
setprecision
(
12
);
result
<<
std
::
setprecision
(
12
);
result
<<
indent
()
<<
"# Define
M
aterials
\n
"
;
result
<<
indent
()
<<
"# Define
m
aterials
\n
"
;
std
::
set
<
std
::
string
>
visitedMaterials
;
std
::
set
<
std
::
string
>
visitedMaterials
;
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
if
(
visitedMaterials
.
find
(
it
->
second
)
!=
visitedMaterials
.
end
())
if
(
visitedMaterials
.
find
(
it
->
second
)
!=
visitedMaterials
.
end
())
...
@@ -143,7 +143,7 @@ std::string SampleToPython::defineLayers() const
...
@@ -143,7 +143,7 @@ std::string SampleToPython::defineLayers() const
return
"# No Layers.
\n\n
"
;
return
"# No Layers.
\n\n
"
;
std
::
ostringstream
result
;
std
::
ostringstream
result
;
result
<<
std
::
setprecision
(
12
);
result
<<
std
::
setprecision
(
12
);
result
<<
"
\n
"
<<
indent
()
<<
"# Define
L
ayers
\n
"
;
result
<<
"
\n
"
<<
indent
()
<<
"# Define
l
ayers
\n
"
;
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
const
Layer
*
layer
=
it
->
first
;
const
Layer
*
layer
=
it
->
first
;
result
<<
indent
()
<<
it
->
second
<<
" = ba.Layer("
result
<<
indent
()
<<
it
->
second
<<
" = ba.Layer("
...
@@ -165,7 +165,7 @@ std::string SampleToPython::defineFormFactors() const
...
@@ -165,7 +165,7 @@ std::string SampleToPython::defineFormFactors() const
return
""
;
return
""
;
std
::
ostringstream
result
;
std
::
ostringstream
result
;
result
<<
std
::
setprecision
(
12
);
result
<<
std
::
setprecision
(
12
);
result
<<
"
\n
"
<<
indent
()
<<
"# Define
F
orm
F
actors
\n
"
;
result
<<
"
\n
"
<<
indent
()
<<
"# Define
f
orm
f
actors
\n
"
;
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
const
IFormFactor
*
ff
=
it
->
first
;
const
IFormFactor
*
ff
=
it
->
first
;
result
<<
indent
()
<<
it
->
second
<<
" = ba.FormFactor"
<<
ff
->
getName
()
<<
"("
result
<<
indent
()
<<
it
->
second
<<
" = ba.FormFactor"
<<
ff
->
getName
()
<<
"("
...
@@ -181,7 +181,7 @@ std::string SampleToPython::defineParticles() const
...
@@ -181,7 +181,7 @@ std::string SampleToPython::defineParticles() const
return
""
;
return
""
;
std
::
ostringstream
result
;
std
::
ostringstream
result
;
result
<<
std
::
setprecision
(
12
);
result
<<
std
::
setprecision
(
12
);
result
<<
"
\n
"
<<
indent
()
<<
"# Define
P
articles
\n
"
;
result
<<
"
\n
"
<<
indent
()
<<
"# Define
p
articles
\n
"
;
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
const
Particle
*
particle
=
it
->
first
;
const
Particle
*
particle
=
it
->
first
;
std
::
string
particle_name
=
it
->
second
;
std
::
string
particle_name
=
it
->
second
;
...
@@ -204,7 +204,7 @@ std::string SampleToPython::defineCoreShellParticles() const
...
@@ -204,7 +204,7 @@ std::string SampleToPython::defineCoreShellParticles() const
return
""
;
return
""
;
std
::
ostringstream
result
;
std
::
ostringstream
result
;
result
<<
std
::
setprecision
(
12
);
result
<<
std
::
setprecision
(
12
);
result
<<
"
\n
"
<<
indent
()
<<
"# Define
C
ore
S
hell
P
articles
\n
"
;
result
<<
"
\n
"
<<
indent
()
<<
"# Define
c
ore
s
hell
p
articles
\n
"
;
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
const
ParticleCoreShell
*
coreshell
=
it
->
first
;
const
ParticleCoreShell
*
coreshell
=
it
->
first
;
result
<<
"
\n
"
result
<<
"
\n
"
...
@@ -387,7 +387,7 @@ std::string SampleToPython::defineInterferenceFunctions() const
...
@@ -387,7 +387,7 @@ std::string SampleToPython::defineInterferenceFunctions() const
return
""
;
return
""
;
std
::
ostringstream
result
;
std
::
ostringstream
result
;
result
<<
std
::
setprecision
(
12
);
result
<<
std
::
setprecision
(
12
);
result
<<
"
\n
"
<<
indent
()
<<
"# Define
I
nterference
F
unctions
\n
"
;
result
<<
"
\n
"
<<
indent
()
<<
"# Define
i
nterference
f
unctions
\n
"
;
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
const
IInterferenceFunction
*
interference
=
it
->
first
;
const
IInterferenceFunction
*
interference
=
it
->
first
;
...
@@ -511,7 +511,7 @@ std::string SampleToPython::defineParticleLayouts() const
...
@@ -511,7 +511,7 @@ std::string SampleToPython::defineParticleLayouts() const
return
""
;
return
""
;
std
::
ostringstream
result
;
std
::
ostringstream
result
;
result
<<
std
::
setprecision
(
12
);
result
<<
std
::
setprecision
(
12
);
result
<<
"
\n
"
<<
indent
()
<<
"# Define
P
article
L
ayouts and adding
P
articles
\n
"
;
result
<<
"
\n
"
<<
indent
()
<<
"# Define
p
article
l
ayouts and adding
p
articles
\n
"
;
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
const
ParticleLayout
*
iLayout
=
it
->
first
;
const
ParticleLayout
*
iLayout
=
it
->
first
;
if
(
const
ParticleLayout
*
particleLayout
=
dynamic_cast
<
const
ParticleLayout
*>
(
iLayout
))
{
if
(
const
ParticleLayout
*
particleLayout
=
dynamic_cast
<
const
ParticleLayout
*>
(
iLayout
))
{
...
@@ -543,7 +543,7 @@ std::string SampleToPython::defineRoughnesses() const
...
@@ -543,7 +543,7 @@ std::string SampleToPython::defineRoughnesses() const
return
""
;
return
""
;
std
::
ostringstream
result
;
std
::
ostringstream
result
;
result
<<
std
::
setprecision
(
12
);
result
<<
std
::
setprecision
(
12
);
result
<<
"
\n
"
<<
indent
()
<<
"# Define
R
oughness
P
arameters
\n
"
;
result
<<
"
\n
"
<<
indent
()
<<
"# Define
r
oughness
p
arameters
\n
"
;
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
result
<<
indent
()
<<
it
->
second
<<
" = ba.LayerRoughness("
result
<<
indent
()
<<
it
->
second
<<
" = ba.LayerRoughness("
<<
pyfmt2
::
argumentList
(
it
->
first
)
<<
")
\n
"
;
<<
pyfmt2
::
argumentList
(
it
->
first
)
<<
")
\n
"
;
...
@@ -575,7 +575,7 @@ std::string SampleToPython::defineMultiLayers() const
...
@@ -575,7 +575,7 @@ std::string SampleToPython::defineMultiLayers() const
return
"# No MultiLayers.
\n\n
"
;
return
"# No MultiLayers.
\n\n
"
;
std
::
ostringstream
result
;
std
::
ostringstream
result
;
result
<<
std
::
setprecision
(
12
);
result
<<
std
::
setprecision
(
12
);
result
<<
"
\n
"
<<
indent
()
<<
"# Define
M
ultilayers
\n
"
;
result
<<
"
\n
"
<<
indent
()
<<
"# Define
m
ultilayers
\n
"
;
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
for
(
auto
it
=
themap
->
begin
();
it
!=
themap
->
end
();
++
it
)
{
result
<<
indent
()
<<
it
->
second
<<
" = ba.MultiLayer()
\n
"
;
result
<<
indent
()
<<
it
->
second
<<
" = ba.MultiLayer()
\n
"
;
double
ccl
=
it
->
first
->
crossCorrLength
();
double
ccl
=
it
->
first
->
crossCorrLength
();
...
...
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