Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hysop
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
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
particle_methods
hysop
Commits
ad3d0649
Commit
ad3d0649
authored
7 years ago
by
Jean-Baptiste Keck
Browse files
Options
Downloads
Patches
Plain Diff
ghost exchangers
parent
64c25914
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/scalar_advection/scalar_advection.py
+4
-0
4 additions, 0 deletions
examples/scalar_advection/scalar_advection.py
hysop/constants.py
+2
-0
2 additions, 0 deletions
hysop/constants.py
hysop/fields/ghost_exchangers.py
+353
-121
353 additions, 121 deletions
hysop/fields/ghost_exchangers.py
with
359 additions
and
121 deletions
examples/scalar_advection/scalar_advection.py
+
4
−
0
View file @
ad3d0649
...
...
@@ -20,6 +20,8 @@ def compute(args):
def
init_velocity
(
data
,
coords
):
for
i
,
d
in
enumerate
(
data
):
d
[...]
=
args
.
velocity
[::
-
1
][
i
]
# data[0][...] = np.arange(data[0].shape[0])[:,None]
# data[1][...] = -np.arange(data[0].shape[0])[:,None]
## Function to compute initial scalar values
def
init_scalar
(
data
,
coords
):
...
...
@@ -101,6 +103,8 @@ def compute(args):
dfields
=
problem
.
input_discrete_fields
dfields
[
velo
].
initialize
(
formula
=
init_velocity
)
dfields
[
scalar
].
initialize
(
formula
=
init_scalar
)
# import sys
# sys.exit(1)
# Create a simulation and solve the problem
# (do not forget to specify the dt parameter here)
...
...
This diff is collapsed.
Click to expand it.
hysop/constants.py
+
2
−
0
View file @
ad3d0649
...
...
@@ -102,6 +102,8 @@ def implementation_to_backend(implementation):
GhostOperation
=
EnumFactory
.
create
(
'
GhostOperation
'
,
[
'
EXCHANGE
'
,
'
ACCUMULATE
'
])
ExchangeMethod
=
EnumFactory
.
create
(
'
ExchangeMethod
'
,
[
'
ISEND_IRECV
'
,
'
NEIGHBOR_ALL_TO_ALL_V
'
,
'
NEIGHBOR_ALL_TO_ALL_W
'
])
Precision
=
EnumFactory
.
create
(
'
Precision
'
,
[
'
DEFAULT
'
,
'
SAME
'
,
'
QUAD
'
,
'
LONG_DOUBLE
'
,
'
DOUBLE
'
,
'
FLOAT
'
,
'
HALF
'
])
...
...
This diff is collapsed.
Click to expand it.
hysop/fields/ghost_exchangers.py
+
353
−
121
View file @
ad3d0649
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