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
b6258e45
Commit
b6258e45
authored
4 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
PyCore/polmagcylinders2.py: print progress messages
parent
ec874f37
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
Tests/Functional/Python/PyCore/polmagcylinders2.py
+8
-1
8 additions, 1 deletion
Tests/Functional/Python/PyCore/polmagcylinders2.py
with
8 additions
and
1 deletion
Tests/Functional/Python/PyCore/polmagcylinders2.py
+
8
−
1
View file @
b6258e45
...
@@ -14,6 +14,7 @@ REFERENCE_DIR = "@TEST_REFERENCE_DIR@/Core"
...
@@ -14,6 +14,7 @@ REFERENCE_DIR = "@TEST_REFERENCE_DIR@/Core"
# describe sample and run simulation
# describe sample and run simulation
# ----------------------------------
# ----------------------------------
def
getSimulationIntensity
(
rho_beam
,
efficiency
):
def
getSimulationIntensity
(
rho_beam
,
efficiency
):
print
(
"
- simulate
"
,
flush
=
True
)
# defining materials
# defining materials
mAmbience
=
HomogeneousMaterial
(
"
Air
"
,
0.0
,
0.0
)
mAmbience
=
HomogeneousMaterial
(
"
Air
"
,
0.0
,
0.0
)
mSubstrate
=
HomogeneousMaterial
(
"
Substrate
"
,
15e-6
,
0.0
)
mSubstrate
=
HomogeneousMaterial
(
"
Substrate
"
,
15e-6
,
0.0
)
...
@@ -48,6 +49,7 @@ def getSimulationIntensity(rho_beam, efficiency):
...
@@ -48,6 +49,7 @@ def getSimulationIntensity(rho_beam, efficiency):
simulation
.
setSample
(
multi_layer
)
simulation
.
setSample
(
multi_layer
)
simulation
.
setBeamIntensity
(
1e9
)
simulation
.
setBeamIntensity
(
1e9
)
simulation
.
runSimulation
()
simulation
.
runSimulation
()
print
(
"
- - simulation done
"
,
flush
=
True
)
return
simulation
.
result
()
return
simulation
.
result
()
...
@@ -56,12 +58,17 @@ def get_reference_data(filename):
...
@@ -56,12 +58,17 @@ def get_reference_data(filename):
"""
"""
read and return reference data from file
read and return reference data from file
"""
"""
return
IntensityDataIOFactory
.
readIntensityData
(
os
.
path
.
join
(
REFERENCE_DIR
,
filename
))
path
=
os
.
path
.
join
(
REFERENCE_DIR
,
filename
)
print
(
"
- read reference from
"
,
path
,
flush
=
True
)
ret
=
IntensityDataIOFactory
.
readIntensityData
(
path
)
print
(
"
- - reference read
"
,
flush
=
True
)
return
ret
# --------------------------------------------------------------
# --------------------------------------------------------------
# run test and analyse test results
# run test and analyse test results
# --------------------------------------------------------------
# --------------------------------------------------------------
def
run_test
():
def
run_test
():
print
(
"
run test
"
,
flush
=
True
)
zplus
=
kvector_t
(
0.0
,
0.0
,
1.0
)
zplus
=
kvector_t
(
0.0
,
0.0
,
1.0
)
zmin
=
kvector_t
(
0.0
,
0.0
,
-
1.0
)
zmin
=
kvector_t
(
0.0
,
0.0
,
-
1.0
)
...
...
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