Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openfpm_pdata
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
Model registry
Operate
Environments
Monitor
Incidents
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
Sbalzarini Lab
Software
Parallel Computing
OpenFPM
openfpm_pdata
Commits
dc67afff
Commit
dc67afff
authored
4 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Toward subset
parent
bedb4e04
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
openfpm_numerics
+1
-1
1 addition, 1 deletion
openfpm_numerics
src/Vector/vector_dist.hpp
+49
-0
49 additions, 0 deletions
src/Vector/vector_dist.hpp
src/Vector/vector_dist_subset.hpp
+44
-4
44 additions, 4 deletions
src/Vector/vector_dist_subset.hpp
with
94 additions
and
5 deletions
openfpm_numerics
@
8865e41b
Subproject commit
9c7fd13a7b6735c2384430bb96abb1596ec6b6ea
Subproject commit
8865e41b8572cf0a8385562947c1f630dfcfff7c
This diff is collapsed.
Click to expand it.
src/Vector/vector_dist.hpp
+
49
−
0
View file @
dc67afff
...
...
@@ -568,6 +568,16 @@ public:
return
g_m
;
}
/*! \brief return the local size of the vector
*
* \return local size
*
*/
size_t
size_local_orig
()
const
{
return
g_m
;
}
/*! \brief return the local size of the vector
*
* \return local size
...
...
@@ -632,6 +642,40 @@ public:
return
v_pos
.
template
get
<
0
>(
vec_key
);
}
/*! \brief Get the position of an element
*
* see the vector_dist iterator usage to get an element key
*
* \param vec_key element
*
* \return the position of the element in space
*
*/
inline
auto
getPosOrig
(
vect_dist_key_dx
vec_key
)
const
->
decltype
(
v_pos
.
template
get
<
0
>(
vec_key
.
getKey
()))
{
#ifdef SE_CLASS3
check_for_pos_nan_inf
<
prop
::
max_prop_real
,
prop
::
max_prop
>
(
*
this
,
vec_key
.
getKey
());
#endif
return
v_pos
.
template
get
<
0
>(
vec_key
.
getKey
());
}
/*! \brief Get the position of an element
*
* see the vector_dist iterator usage to get an element key
*
* \param vec_key element
*
* \return the position of the element in space
*
*/
inline
auto
getPosOrig
(
size_t
vec_key
)
->
decltype
(
v_pos
.
template
get
<
0
>(
vec_key
))
{
#ifdef SE_CLASS3
check_for_pos_nan_inf
<
prop
::
max_prop_real
,
prop
::
max_prop
>
(
*
this
,
vec_key
);
#endif
return
v_pos
.
template
get
<
0
>(
vec_key
);
}
/*! \brief Get the position of an element
*
* see the vector_dist iterator usage to get an element key
...
...
@@ -1031,6 +1075,11 @@ public:
////////////////////////////////////////////////////////////////
vect_dist_key_dx
getOriginKey
(
vect_dist_key_dx
vec_key
)
{
return
vec_key
;
}
/*! \brief Construct a cell list symmetric based on a cut of radius
*
* \tparam CellL CellList type to construct
...
...
This diff is collapsed.
Click to expand it.
src/Vector/vector_dist_subset.hpp
+
44
−
4
View file @
dc67afff
...
...
@@ -82,6 +82,16 @@ public:
return
g_m
;
}
/*! \brief return the local size of the original vector
*
* \return local size
*
*/
size_t
size_local_orig
()
const
{
return
vd
.
size_local
();
}
#ifndef ONLY_READWRITE_GETTER
/*! \brief Get the position of an element
...
...
@@ -112,6 +122,34 @@ public:
return
vd
.
getPos
(
vect_dist_key_dx
(
pid
.
template
get
<
0
>(
vec_key
.
getKey
())));
}
/*! \brief Get the position of an element
*
* see the vector_dist iterator usage to get an element key
*
* \param vec_key element
*
* \return the position of the element in space
*
*/
inline
auto
getPosOrig
(
vect_dist_key_dx
vec_key
)
->
decltype
(
vd
.
getPos
(
vec_key
))
{
return
vd
.
getPos
(
vec_key
.
getKey
());
}
/*! \brief Get the position of an element
*
* see the vector_dist iterator usage to get an element key
*
* \param vec_key element
*
* \return the position of the element in space
*
*/
inline
auto
getPosOrig
(
vect_dist_key_dx
vec_key
)
const
->
decltype
(
vd
.
getPos
(
vec_key
))
{
return
vd
.
getPos
(
vec_key
.
getKey
());
}
/*! \brief Get the property of an element
*
* see the vector_dist iterator usage to get an element key
...
...
@@ -143,6 +181,11 @@ public:
}
vect_dist_key_dx
getOriginKey
(
vect_dist_key_dx
vec_key
)
{
return
vect_dist_key_dx
(
pid
.
template
get
<
0
>(
vec_key
.
getKey
()));
}
#endif
/*! \brief Get an iterator that traverse the particles in the domain
...
...
@@ -176,9 +219,6 @@ public:
if
(
no_se3
==
false
)
{
se3
.
getNN
();}
#endif
#ifdef SE_CLASS1
check_ghost_compatible_rcut
(
r_cut
);
#endif
// Get ghost and anlarge by 1%
Ghost
<
dim
,
St
>
g
=
vd
.
getDecomposition
().
getGhost
();
...
...
@@ -236,7 +276,7 @@ public:
Point
<
dim
,
St
>
pos
=
getPos
(
key
);
cell_list
.
add
(
pos
,
key
.
getKey
());
cell_list
.
add
(
pos
,
pid
.
template
get
<
0
>(
key
.
getKey
())
)
;
++
it
;
}
...
...
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