Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TurTLE
TurTLE
Commits
b46fc143
Commit
b46fc143
authored
8 years ago
by
Berenger Bramas
Browse files
Options
Downloads
Patches
Plain Diff
Rename fs variable in particles system builder
parent
d95e7091
No related branches found
No related tags found
2 merge requests
!21
Bugfix/nansampling
,
!3
Bugfix/event manager show html
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bfps/cpp/particles/particles_system_builder.hpp
+16
-17
16 additions, 17 deletions
bfps/cpp/particles/particles_system_builder.hpp
with
16 additions
and
17 deletions
bfps/cpp/particles/particles_system_builder.hpp
+
16
−
17
View file @
b46fc143
...
@@ -112,7 +112,7 @@ template <class field_rnumber, field_backend be, class particles_rnumber>
...
@@ -112,7 +112,7 @@ template <class field_rnumber, field_backend be, class particles_rnumber>
struct
particles_system_build_container
{
struct
particles_system_build_container
{
template
<
const
int
interpolation_size
,
const
int
spline_mode
>
template
<
const
int
interpolation_size
,
const
int
spline_mode
>
static
std
::
unique_ptr
<
abstract_particles_system
<
particles_rnumber
>>
instanciate
(
static
std
::
unique_ptr
<
abstract_particles_system
<
particles_rnumber
>>
instanciate
(
const
field
<
field_rnumber
,
be
,
THREE
>*
fs_
cvorticity
,
// (field object)
const
field
<
field_rnumber
,
be
,
THREE
>*
fs_
field
,
// (field object)
const
kspace
<
be
,
SMOOTH
>*
fs_kk
,
// (kspace object, contains dkx, dky, dkz)
const
kspace
<
be
,
SMOOTH
>*
fs_kk
,
// (kspace object, contains dkx, dky, dkz)
const
int
nsteps
,
// to check coherency between parameters and hdf input file (nb rhs)
const
int
nsteps
,
// to check coherency between parameters and hdf input file (nb rhs)
const
int
nparticles
,
// to check coherency between parameters and hdf input file
const
int
nparticles
,
// to check coherency between parameters and hdf input file
...
@@ -122,21 +122,21 @@ struct particles_system_build_container {
...
@@ -122,21 +122,21 @@ struct particles_system_build_container {
// The size of the field grid (global size) all_size seems
// The size of the field grid (global size) all_size seems
std
::
array
<
size_t
,
3
>
field_grid_dim
;
std
::
array
<
size_t
,
3
>
field_grid_dim
;
field_grid_dim
[
IDX_X
]
=
fs_
cvorticity
->
rlayout
->
sizes
[
IDX_X
];
// nx
field_grid_dim
[
IDX_X
]
=
fs_
field
->
rlayout
->
sizes
[
IDX_X
];
// nx
field_grid_dim
[
IDX_Y
]
=
fs_
cvorticity
->
rlayout
->
sizes
[
IDX_Y
];
// nx
field_grid_dim
[
IDX_Y
]
=
fs_
field
->
rlayout
->
sizes
[
IDX_Y
];
// nx
field_grid_dim
[
IDX_Z
]
=
fs_
cvorticity
->
rlayout
->
sizes
[
IDX_Z
];
// nz
field_grid_dim
[
IDX_Z
]
=
fs_
field
->
rlayout
->
sizes
[
IDX_Z
];
// nz
// The size of the local field grid (the field nodes that belong to current process)
// The size of the local field grid (the field nodes that belong to current process)
std
::
array
<
size_t
,
3
>
local_field_dims
;
std
::
array
<
size_t
,
3
>
local_field_dims
;
local_field_dims
[
IDX_X
]
=
fs_
cvorticity
->
rlayout
->
subsizes
[
IDX_X
];
local_field_dims
[
IDX_X
]
=
fs_
field
->
rlayout
->
subsizes
[
IDX_X
];
local_field_dims
[
IDX_Y
]
=
fs_
cvorticity
->
rlayout
->
subsizes
[
IDX_Y
];
local_field_dims
[
IDX_Y
]
=
fs_
field
->
rlayout
->
subsizes
[
IDX_Y
];
local_field_dims
[
IDX_Z
]
=
fs_
cvorticity
->
rlayout
->
subsizes
[
IDX_Z
];
local_field_dims
[
IDX_Z
]
=
fs_
field
->
rlayout
->
subsizes
[
IDX_Z
];
// The offset of the local field grid
// The offset of the local field grid
std
::
array
<
size_t
,
3
>
local_field_offset
;
std
::
array
<
size_t
,
3
>
local_field_offset
;
local_field_offset
[
IDX_X
]
=
fs_
cvorticity
->
rlayout
->
starts
[
IDX_X
];
local_field_offset
[
IDX_X
]
=
fs_
field
->
rlayout
->
starts
[
IDX_X
];
local_field_offset
[
IDX_Y
]
=
fs_
cvorticity
->
rlayout
->
starts
[
IDX_Y
];
local_field_offset
[
IDX_Y
]
=
fs_
field
->
rlayout
->
starts
[
IDX_Y
];
local_field_offset
[
IDX_Z
]
=
fs_
cvorticity
->
rlayout
->
starts
[
IDX_Z
];
local_field_offset
[
IDX_Z
]
=
fs_
field
->
rlayout
->
starts
[
IDX_Z
];
// Ensure that 1D partitioning is used
// Ensure that 1D partitioning is used
{
{
assert
(
myrank
<
field_grid_dim
[
IDX_Z
]);
assert
(
myrank
<
field_grid_dim
[
IDX_Z
]);
...
@@ -155,9 +155,9 @@ struct particles_system_build_container {
...
@@ -155,9 +155,9 @@ struct particles_system_build_container {
}
}
// The offset of the local field grid
// The offset of the local field grid
std
::
array
<
size_t
,
3
>
local_field_mem_size
;
std
::
array
<
size_t
,
3
>
local_field_mem_size
;
local_field_mem_size
[
IDX_X
]
=
fs_
cvorticity
->
rmemlayout
->
subsizes
[
IDX_X
];
local_field_mem_size
[
IDX_X
]
=
fs_
field
->
rmemlayout
->
subsizes
[
IDX_X
];
local_field_mem_size
[
IDX_Y
]
=
fs_
cvorticity
->
rmemlayout
->
subsizes
[
IDX_Y
];
local_field_mem_size
[
IDX_Y
]
=
fs_
field
->
rmemlayout
->
subsizes
[
IDX_Y
];
local_field_mem_size
[
IDX_Z
]
=
fs_
cvorticity
->
rmemlayout
->
subsizes
[
IDX_Z
];
local_field_mem_size
[
IDX_Z
]
=
fs_
field
->
rmemlayout
->
subsizes
[
IDX_Z
];
// The spatial box size (all particles should be included inside)
// The spatial box size (all particles should be included inside)
std
::
array
<
particles_rnumber
,
3
>
spatial_box_width
;
std
::
array
<
particles_rnumber
,
3
>
spatial_box_width
;
...
@@ -181,13 +181,12 @@ struct particles_system_build_container {
...
@@ -181,13 +181,12 @@ struct particles_system_build_container {
spatial_partition_width
,
spatial_partition_width
,
my_spatial_low_limit_z
,
my_spatial_low_limit_z
,
my_spatial_up_limit_z
,
my_spatial_up_limit_z
,
fs_
cvorticity
->
get_rdata
(),
fs_
field
->
get_rdata
(),
local_field_dims
,
local_field_dims
,
local_field_offset
,
local_field_offset
,
local_field_mem_size
,
local_field_mem_size
,
mpi_comm
);
mpi_comm
);
// Load particles from hdf5
// Load particles from hdf5
particles_input_hdf5
<
particles_rnumber
,
3
,
3
>
generator
(
mpi_comm
,
fname_input
,
particles_input_hdf5
<
particles_rnumber
,
3
,
3
>
generator
(
mpi_comm
,
fname_input
,
dset_name
,
my_spatial_low_limit_z
,
my_spatial_up_limit_z
);
dset_name
,
my_spatial_low_limit_z
,
my_spatial_up_limit_z
);
...
@@ -214,7 +213,7 @@ struct particles_system_build_container {
...
@@ -214,7 +213,7 @@ struct particles_system_build_container {
template
<
class
field_rnumber
,
field_backend
be
,
class
particles_rnumber
=
double
>
template
<
class
field_rnumber
,
field_backend
be
,
class
particles_rnumber
=
double
>
inline
std
::
unique_ptr
<
abstract_particles_system
<
particles_rnumber
>>
particles_system_builder
(
inline
std
::
unique_ptr
<
abstract_particles_system
<
particles_rnumber
>>
particles_system_builder
(
const
field
<
field_rnumber
,
be
,
THREE
>*
fs_
cvorticity
,
// (field object)
const
field
<
field_rnumber
,
be
,
THREE
>*
fs_
field
,
// (field object)
const
kspace
<
be
,
SMOOTH
>*
fs_kk
,
// (kspace object, contains dkx, dky, dkz)
const
kspace
<
be
,
SMOOTH
>*
fs_kk
,
// (kspace object, contains dkx, dky, dkz)
const
int
nsteps
,
// to check coherency between parameters and hdf input file (nb rhs)
const
int
nsteps
,
// to check coherency between parameters and hdf input file (nb rhs)
const
int
nparticles
,
// to check coherency between parameters and hdf input file
const
int
nparticles
,
// to check coherency between parameters and hdf input file
...
@@ -229,7 +228,7 @@ inline std::unique_ptr<abstract_particles_system<particles_rnumber>> particles_s
...
@@ -229,7 +228,7 @@ inline std::unique_ptr<abstract_particles_system<particles_rnumber>> particles_s
particles_system_build_container
<
field_rnumber
,
be
,
particles_rnumber
>>
(
particles_system_build_container
<
field_rnumber
,
be
,
particles_rnumber
>>
(
interpolation_size
,
// template iterator 1
interpolation_size
,
// template iterator 1
spline_mode
,
// template iterator 2
spline_mode
,
// template iterator 2
fs_
cvorticity
,
fs_kk
,
nsteps
,
nparticles
,
fname_input
,
dset_name
,
mpi_comm
);
fs_
field
,
fs_kk
,
nsteps
,
nparticles
,
fname_input
,
dset_name
,
mpi_comm
);
}
}
...
...
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