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
4b617216
Commit
4b617216
authored
4 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Fixing boundary conditions
parent
80ca1aad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openfpm_numerics
+1
-1
1 addition, 1 deletion
openfpm_numerics
src/Decomposition/ie_ghost.hpp
+64
-4
64 additions, 4 deletions
src/Decomposition/ie_ghost.hpp
with
65 additions
and
5 deletions
openfpm_numerics
@
b430b2a1
Subproject commit
6f2388aab59ec96b949b5418ec5b2c2f05e4409
2
Subproject commit
b430b2a13ddb4b78ca0efe3e7d6f898d712c118
2
This diff is collapsed.
Click to expand it.
src/Decomposition/ie_ghost.hpp
+
64
−
4
View file @
4b617216
...
...
@@ -84,6 +84,12 @@ class ie_ghost
//! host to device transfer
bool
host_dev_transfer
=
false
;
//! domain
Box
<
dim
,
T
>
domain
;
//! boundary conditions
size_t
bc
[
dim
];
/*! \brief Given a local sub-domain i, it give the id of such sub-domain in the sent list
* for the processor p_id
*
...
...
@@ -190,6 +196,13 @@ protected:
void
generateShiftVectors
(
const
Box
<
dim
,
T
>
&
domain
,
size_t
(
&
bc
)[
dim
])
{
sc_convert
.
generateShiftVectors
(
domain
,
bc
,
shifts
);
this
->
domain
=
domain
;
for
(
int
i
=
0
;
i
<
dim
;
i
++
)
{
this
->
bc
[
i
]
=
bc
[
i
];
}
}
/*! \brief Initialize the geo cell list structure
...
...
@@ -529,6 +542,12 @@ public:
ids_p
.
swap
(
ie
.
ids_p
);
ids
.
swap
(
ie
.
ids
);
// it die anyway we can avoid to swap
domain
=
ie
.
domain
;
for
(
int
i
=
0
;
i
<
dim
;
i
++
)
{
bc
[
i
]
=
ie
.
bc
[
i
];}
return
*
this
;
}
...
...
@@ -544,6 +563,12 @@ public:
shifts
=
ie
.
shifts
;
ids_p
=
ie
.
ids_p
;
ids
=
ie
.
ids
;
domain
=
ie
.
domain
;
domain
=
ie
.
domain
;
for
(
int
i
=
0
;
i
<
dim
;
i
++
)
{
bc
[
i
]
=
ie
.
bc
[
i
];}
return
*
this
;
}
...
...
@@ -570,6 +595,11 @@ public:
tmp
.
private_get_ids_p
()
=
ids_p
;
tmp
.
private_get_ids
()
=
ids
;
tmp
.
private_get_domain
()
=
domain
;
for
(
int
i
=
0
;
i
<
dim
;
i
++
)
{
tmp
.
private_get_bc
()[
i
]
=
bc
[
i
];}
return
tmp
;
}
...
...
@@ -934,7 +964,7 @@ public:
{
size_t
bid
=
cell_it
.
get
();
if
(
Box
<
dim
,
T
>
(
vb_int_box
.
get
(
bid
)).
isInsideNP
(
p
)
==
true
)
if
(
Box
<
dim
,
T
>
(
vb_int_box
.
get
(
bid
)).
isInsideNP
_with_border
(
p
,
domain
,
bc
)
==
true
)
{
ids_p
.
add
(
std
::
pair
<
size_t
,
size_t
>
(
id1
::
id
(
vb_int
.
get
(
bid
),
bid
),
id2
::
id
(
vb_int
.
get
(
bid
),
bid
)));
}
...
...
@@ -983,7 +1013,7 @@ public:
{
size_t
bid
=
cell_it
.
get
();
if
(
Box
<
dim
,
T
>
(
vb_int_box
.
get
(
bid
)).
isInsideNP
(
p
)
==
true
)
if
(
Box
<
dim
,
T
>
(
vb_int_box
.
get
(
bid
)).
isInsideNP
_with_border
(
p
,
domain
,
bc
)
==
true
)
{
ids
.
add
(
id
::
id
(
vb_int
.
get
(
bid
),
bid
));
}
...
...
@@ -1027,7 +1057,7 @@ public:
{
size_t
bid
=
cell_it
.
get
();
if
(
Box
<
dim
,
T
>
(
vb_int_box
.
get
(
bid
)).
isInsideNP
(
p
)
==
true
)
if
(
Box
<
dim
,
T
>
(
vb_int_box
.
get
(
bid
)).
isInsideNP
_with_border
(
p
,
domain
,
bc
)
==
true
)
{
ids_p
.
add
(
std
::
pair
<
size_t
,
size_t
>
(
id1
::
id
(
vb_int
.
get
(
bid
),
bid
),
id2
::
id
(
vb_int
.
get
(
bid
),
bid
)));
}
...
...
@@ -1070,7 +1100,7 @@ public:
{
size_t
bid
=
cell_it
.
get
();
if
(
vb_int
.
get
(
bid
).
box
.
isInsideNP
(
p
)
==
true
)
if
(
vb_int
.
get
(
bid
).
box
.
isInsideNP
_with_border
(
p
,
bc
,
domain
)
==
true
)
{
ids
.
add
(
id
::
id
(
vb_int
.
get
(
bid
),
bid
));
}
...
...
@@ -1188,6 +1218,15 @@ public:
}
}
if
(
domain
!=
ig
.
domain
)
{
return
false
;}
for
(
int
i
=
0
;
i
<
dim
;
i
++
)
{
if
(
bc
[
i
]
!=
ig
.
bc
[
i
])
{
return
false
;}
}
return
true
;
}
...
...
@@ -1316,6 +1355,27 @@ public:
return
ids
;
}
/*! \brief Return the internal data structure domain
*
* \return domain
*
*/
inline
Box
<
dim
,
T
>
&
private_get_domain
()
{
return
domain
;
}
/*! \brief Return the internal data structure domain
*
* \return domain
*
*/
inline
size_t
(
&
private_get_bc
())[
dim
]
{
return
bc
;
}
/*! \brief toKernel() Convert this data-structure into a kernel usable data-structure
*
* \return
...
...
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