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
dc0a296a
Commit
dc0a296a
authored
11 years ago
by
Franck Pérignon
Browse files
Options
Downloads
Patches
Plain Diff
update tests
parent
cfc5f1cf
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
HySoP/hysop/__init__.py.in
+1
-3
1 addition, 3 deletions
HySoP/hysop/__init__.py.in
HySoP/hysop/fields/tests/__init__.py
+0
-8
0 additions, 8 deletions
HySoP/hysop/fields/tests/__init__.py
HySoP/hysop/fields/tests/test_field.py
+16
-2
16 additions, 2 deletions
HySoP/hysop/fields/tests/test_field.py
with
17 additions
and
13 deletions
HySoP/hysop/__init__.py.in
+
1
−
3
View file @
dc0a296a
...
...
@@ -6,7 +6,7 @@ on hybrid architectures (MPI-GPU)
"""
__version__ = 1.00
__all__ = ['Box', 'Field'
, 'AnalyticalField'
]
__all__ = ['Box', 'Field']
# Compilation flags
__MPI_ENABLED__ = "@USE_MPI@" is "ON"
...
...
@@ -35,9 +35,7 @@ Box = domain.box.Box
## Fields
import fields.continuous
import fields.analytical
Field = fields.continuous.Field
AnalyticalField = fields.analytical.AnalyticalField
# ## ## Problem
...
...
This diff is collapsed.
Click to expand it.
HySoP/hysop/fields/tests/__init__.py
deleted
100644 → 0
+
0
−
8
View file @
cfc5f1cf
"""
@package parmepy.domain
@file parmepy/domain/__init__.py
Everything concerning physical domains, their discretizations
and MPI topologies.
"""
This diff is collapsed.
Click to expand it.
HySoP/hysop/fields/tests/test_field.py
+
16
−
2
View file @
dc0a296a
...
...
@@ -2,7 +2,6 @@
Testing parmepy.field.continuous.Field
"""
from
parmepy.fields.continuous
import
Field
from
parmepy.fields.analytical
import
AnalyticalField
from
parmepy.domain.box
import
Box
...
...
@@ -21,7 +20,22 @@ def test_analytical():
"""
Test formula
"""
dom
=
Box
()
formula
=
lambda
x
,
y
,
z
:
(
x
*
y
*
z
,
1.0
,
-
x
*
y
*
z
)
caf
=
Analytical
Field
(
dom
,
formula
)
caf
=
Field
(
dom
,
formula
)
assert
caf
.
value
(
0.
,
0.
,
0.
)
==
(
0.
,
1.
,
0.
)
assert
caf
.
value
(
1.
,
1.
,
1.
)
==
(
1.
,
1.
,
-
1.
)
assert
caf
.
value
(
1.
,
2.
,
3.
)
==
(
6.
,
1.
,
-
6.
)
def
test_analytical_reset
():
"""
Test formula
"""
dom
=
Box
()
formula
=
lambda
x
,
y
,
z
:
(
x
*
y
*
z
,
1.0
,
-
x
*
y
*
z
)
caf
=
Field
(
dom
,
formula
)
assert
caf
.
value
(
0.
,
0.
,
0.
)
==
(
0.
,
1.
,
0.
)
assert
caf
.
value
(
1.
,
1.
,
1.
)
==
(
1.
,
1.
,
-
1.
)
assert
caf
.
value
(
1.
,
2.
,
3.
)
==
(
6.
,
1.
,
-
6.
)
form2
=
lambda
x
,
y
,
z
,
dt
:
(
x
*
y
*
z
,
1.0
,
-
x
*
y
*
z
*
dt
)
caf
.
setFormula
(
form2
)
assert
caf
.
value
(
0.
,
0.
,
0.
,
0.
)
==
(
0.
,
1.
,
0.
)
assert
caf
.
value
(
1.
,
1.
,
1.
,
1.
)
==
(
1.
,
1.
,
-
1.
)
assert
caf
.
value
(
1.
,
2.
,
3.
,
4.
)
==
(
6.
,
1.
,
-
24.
)
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