Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_numerics
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openfpm
openfpm_numerics
Commits
a52a73e5
Commit
a52a73e5
authored
Mar 15, 2017
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing vector dist key
parent
0f726cd2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
src/Operators/Vector/vector_dist_operators.hpp
src/Operators/Vector/vector_dist_operators.hpp
+4
-4
src/Operators/Vector/vector_dist_operators_apply_kernel.hpp
src/Operators/Vector/vector_dist_operators_apply_kernel.hpp
+10
-4
src/Operators/Vector/vector_dist_operators_functions.hpp
src/Operators/Vector/vector_dist_operators_functions.hpp
+2
-2
No files found.
src/Operators/Vector/vector_dist_operators.hpp
View file @
a52a73e5
...
...
@@ -167,7 +167,7 @@ public:
* \return return the result of the expression
*
*/
template
<
typename
r_type
=
typename
std
::
remove_reference
<
decltype
(
o1
.
value
(
vect_dist_key_dx
(
0
))
+
o2
.
value
(
vect_dist_key_dx
(
0
)))>
::
type
>
template
<
typename
r_type
=
typename
std
::
remove_reference
<
decltype
(
o1
.
value
(
vect_dist_key_dx
(
))
+
o2
.
value
(
vect_dist_key_dx
(
)))>
::
type
>
inline
r_type
value
(
const
vect_dist_key_dx
&
key
)
const
{
return
o1
.
value
(
key
)
+
o2
.
value
(
key
);
...
...
@@ -215,7 +215,7 @@ public:
* \return the result of the expression
*
*/
template
<
typename
r_type
=
typename
std
::
remove_reference
<
decltype
(
o1
.
value
(
vect_dist_key_dx
(
0
))
-
o2
.
value
(
vect_dist_key_dx
(
0
)))>
::
type
>
inline
r_type
value
(
const
vect_dist_key_dx
&
key
)
const
template
<
typename
r_type
=
typename
std
::
remove_reference
<
decltype
(
o1
.
value
(
vect_dist_key_dx
(
))
-
o2
.
value
(
vect_dist_key_dx
(
)))>
::
type
>
inline
r_type
value
(
const
vect_dist_key_dx
&
key
)
const
{
return
o1
.
value
(
key
)
-
o2
.
value
(
key
);
}
...
...
@@ -261,7 +261,7 @@ public:
* \return the result of the expression
*
*/
template
<
typename
r_type
=
typename
std
::
remove_reference
<
decltype
(
o1
.
value
(
vect_dist_key_dx
(
0
))
*
o2
.
value
(
vect_dist_key_dx
(
0
)))>
::
type
>
inline
r_type
value
(
const
vect_dist_key_dx
&
key
)
const
template
<
typename
r_type
=
typename
std
::
remove_reference
<
decltype
(
o1
.
value
(
vect_dist_key_dx
(
))
*
o2
.
value
(
vect_dist_key_dx
(
)))>
::
type
>
inline
r_type
value
(
const
vect_dist_key_dx
&
key
)
const
{
return
o1
.
value
(
key
)
*
o2
.
value
(
key
);
}
...
...
@@ -307,7 +307,7 @@ public:
* \return the result of the expression
*
*/
template
<
typename
r_type
=
typename
std
::
remove_reference
<
decltype
(
o1
.
value
(
vect_dist_key_dx
(
0
))
/
o2
.
value
(
vect_dist_key_dx
(
0
)))>
::
type
>
inline
r_type
value
(
const
vect_dist_key_dx
&
key
)
const
template
<
typename
r_type
=
typename
std
::
remove_reference
<
decltype
(
o1
.
value
(
vect_dist_key_dx
(
))
/
o2
.
value
(
vect_dist_key_dx
(
)))>
::
type
>
inline
r_type
value
(
const
vect_dist_key_dx
&
key
)
const
{
return
o1
.
value
(
key
)
/
o2
.
value
(
key
);
}
...
...
src/Operators/Vector/vector_dist_operators_apply_kernel.hpp
View file @
a52a73e5
...
...
@@ -106,8 +106,11 @@ struct apply_kernel_is_number_or_expression
// given by the Near particle, exclude itself
if
(
nnp
!=
key
.
getKey
())
{
vect_dist_key_dx
nnp_k
;
nnp_k
.
setKey
(
nnp
);
// property of the particle x
rtype
prp_q
=
v_exp
.
value
(
nnp
);
rtype
prp_q
=
v_exp
.
value
(
nnp
_k
);
// position of the particle q
Point
<
vector
::
dims
,
typename
vector
::
stype
>
q
=
vd
.
getPos
(
nnp
);
...
...
@@ -214,8 +217,11 @@ struct apply_kernel_is_number_or_expression_gen
// given by the Near particle, exclude itself
if
(
nnp
!=
key
.
getKey
())
{
vect_dist_key_dx
nnp_k
;
nnp_k
.
setKey
(
nnp
);
// property of the particle x
rtype
prp_q
=
v_exp
.
value
(
nnp
);
rtype
prp_q
=
v_exp
.
value
(
nnp
_k
);
pse
+=
lker
.
value
(
key
.
getKey
(),
nnp
,
prp_p
,
prp_q
,
vd
);
}
...
...
@@ -258,7 +264,7 @@ class vector_dist_expression_op<exp1,vector_type,VECT_APPLYKER_IN>
const
vector_orig
&
vd
;
//! Get the return type of applying the kernel to a particle
typedef
typename
apply_kernel_rtype
<
decltype
(
o1
.
value
(
vect_dist_key_dx
(
0
)))
>::
rtype
rtype
;
typedef
typename
apply_kernel_rtype
<
decltype
(
o1
.
value
(
vect_dist_key_dx
()))
>::
rtype
rtype
;
public:
...
...
@@ -390,7 +396,7 @@ class vector_dist_expression_op<exp1,vector_type,VECT_APPLYKER_IN_GEN>
const
vector_orig
&
vd
;
//! Return type of the expression
typedef
typename
apply_kernel_rtype
<
decltype
(
o1
.
value
(
vect_dist_key_dx
(
0
)))
>::
rtype
rtype
;
typedef
typename
apply_kernel_rtype
<
decltype
(
o1
.
value
(
vect_dist_key_dx
()))
>::
rtype
rtype
;
public:
...
...
src/Operators/Vector/vector_dist_operators_functions.hpp
View file @
a52a73e5
...
...
@@ -222,7 +222,7 @@ class vector_dist_expression_op<exp1,vector_type,VECT_SUM_REDUCE>
const
exp1
o1
;
//! return type of this expression
typedef
typename
apply_kernel_rtype
<
decltype
(
o1
.
value
(
vect_dist_key_dx
(
0
)))
>::
rtype
rtype
;
typedef
typename
apply_kernel_rtype
<
decltype
(
o1
.
value
(
vect_dist_key_dx
()))
>::
rtype
rtype
;
//! return type of the calculated value (without reference)
mutable
typename
std
::
remove_reference
<
rtype
>::
type
val
;
...
...
@@ -261,7 +261,7 @@ public:
inline
typename
std
::
remove_reference
<
rtype
>::
type
get
()
{
init
();
return
value
(
vect_dist_key_dx
(
0
));
return
value
(
vect_dist_key_dx
());
}
//! it return the result of the expression (precalculated before)
...
...
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