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
dcb31edb
Commit
dcb31edb
authored
6 years ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
try suggested number_of_componentns alternative
parent
20c6ce71
No related branches found
No related tags found
No related merge requests found
Pipeline
#44460
failed
6 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bfps/cpp/field.hpp
+1
-0
1 addition, 0 deletions
bfps/cpp/field.hpp
bfps/cpp/particles/particles_field_computer.hpp
+1
-11
1 addition, 11 deletions
bfps/cpp/particles/particles_field_computer.hpp
with
2 additions
and
11 deletions
bfps/cpp/field.hpp
+
1
−
0
View file @
dcb31edb
...
...
@@ -58,6 +58,7 @@ class field
private:
rnumber
*
__restrict__
data
;
/**< data array */
public:
static
const
int
number_of_components
=
ncomp
(
fc
);
hsize_t
npoints
;
/**< total number of grid points. Useful for normalization. */
bool
real_space_representation
;
/**< `true` if field is in real space representation. */
...
...
This diff is collapsed.
Click to expand it.
bfps/cpp/particles/particles_field_computer.hpp
+
1
−
11
View file @
dcb31edb
...
...
@@ -12,16 +12,6 @@ template <class partsize_t,
class
interpolator_class
,
int
interp_neighbours
>
class
particles_field_computer
{
// TODO but not critical, add in field:
// static const int nb_components = ncomp(fc);
// and use it as field_class::nb_components
// but failed up to now....
template
<
typename
rnumber
,
field_backend
be
,
field_components
fc
>
static
constexpr
int
nbcomp
(
const
field
<
rnumber
,
be
,
fc
>&
/*field*/
){
return
ncomp
(
fc
);
}
const
std
::
array
<
int
,
3
>
field_grid_dim
;
const
std
::
pair
<
int
,
int
>
current_partition_interval
;
...
...
@@ -77,7 +67,7 @@ public:
const
real_number
particles_positions
[],
real_number
particles_current_rhs
[],
const
partsize_t
nb_particles
)
const
{
constexpr
int
nb_components_in_field
=
nbcomp
(
field
)
;
constexpr
int
nb_components_in_field
=
field
.
number_of_components
;
static_assert
(
nb_components_in_field
<=
size_particle_rhs
,
"Cannot store all the component in the given array"
);
TIMEZONE
(
"particles_field_computer::apply_computation"
);
...
...
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