Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
OPAL
src
Commits
fd1ff856
Commit
fd1ff856
authored
Jun 03, 2020
by
frey_m
Browse files
FieldWriter: only single core
parent
71e17040
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
src/Classic/Algorithms/PartBunch.cpp
src/Classic/Algorithms/PartBunch.cpp
+2
-5
src/Structure/FieldWriter.h
src/Structure/FieldWriter.h
+1
-1
src/Structure/FieldWriter.hpp
src/Structure/FieldWriter.hpp
+5
-1
No files found.
src/Classic/Algorithms/PartBunch.cpp
View file @
fd1ff856
...
...
@@ -45,9 +45,6 @@
//#define FIELDSTDOUT
// Class PartBunch
// ------------------------------------------------------------------------
PartBunch
::
PartBunch
(
const
PartData
*
ref
)
:
// Layout is set using setSolver()
PartBunchBase
<
double
,
3
>
(
new
PartBunch
::
pbase_t
(
new
Layout_t
()),
ref
),
interpolationCacheSet_m
(
false
)
...
...
@@ -256,7 +253,7 @@ void PartBunch::computeSelfFields(int binNumber) {
const
int
dumpFreq
=
100
;
VField_t
tmp_eg
=
eg_m
;
if
(
Ippl
::
getNodes
()
==
1
&&
(
localTrackStep_m
+
1
)
%
dumpFreq
==
0
)
{
if
((
localTrackStep_m
+
1
)
%
dumpFreq
==
0
)
{
Vector_t
rmin
,
rmax
;
get_bounds
(
rmin
,
rmax
);
...
...
@@ -315,7 +312,7 @@ void PartBunch::computeSelfFields(int binNumber) {
#ifdef DBG_SCALARFIELD
tmp_eg
+=
eg_m
;
if
(
Ippl
::
getNodes
()
==
1
&&
(
localTrackStep_m
+
1
)
%
dumpFreq
==
0
)
{
if
((
localTrackStep_m
+
1
)
%
dumpFreq
==
0
)
{
FieldWriter
fwriter
;
fwriter
.
dumpField
(
tmp_eg
,
"e"
,
"V/m"
,
localTrackStep_m
/
dumpFreq
);
}
...
...
src/Structure/FieldWriter.h
View file @
fd1ff856
//
// Class FieldWriter
// This class writes the bunch internal fields on the grid to
// file.
// file.
It supports single core execution only.
//
// Copyright (c) 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
// All rights reserved
...
...
src/Structure/FieldWriter.hpp
View file @
fd1ff856
//
// Class FieldWriter
// This class writes the bunch internal fields on the grid to
// file.
// file.
It supports single core execution only.
//
// Copyright (c) 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
// All rights reserved
...
...
@@ -31,6 +31,10 @@ void FieldWriter::dumpField(FieldType& field, std::string name,
std
::
string
unit
,
long
long
step
,
FieldType
*
image
)
{
if
(
Ippl
::
getNodes
()
>
1
)
{
return
;
}
constexpr
bool
isVectorField
=
std
::
is_same
<
VField_t
,
FieldType
>::
value
;
std
::
string
type
=
(
isVectorField
)
?
"field"
:
"scalar"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment