Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pairs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
software
pairs
Commits
ea3310d7
Commit
ea3310d7
authored
3 years ago
by
Rafael Ravedutti
Browse files
Options
Downloads
Patches
Plain Diff
Fix references in modules
Signed-off-by:
Rafael Ravedutti
<
rafaelravedutti@gmail.com
>
parent
3514c9cd
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/pairs/ir/loops.py
+1
-1
1 addition, 1 deletion
src/pairs/ir/loops.py
src/pairs/ir/visitor.py
+8
-1
8 additions, 1 deletion
src/pairs/ir/visitor.py
src/pairs/sim/simulation.py
+2
-0
2 additions, 0 deletions
src/pairs/sim/simulation.py
src/pairs/sim/timestep.py
+4
-1
4 additions, 1 deletion
src/pairs/sim/timestep.py
with
15 additions
and
3 deletions
src/pairs/ir/loops.py
+
1
−
1
View file @
ea3310d7
...
@@ -76,7 +76,7 @@ class ParticleFor(For):
...
@@ -76,7 +76,7 @@ class ParticleFor(For):
return
f
"
ParticleFor<>
"
return
f
"
ParticleFor<>
"
def
children
(
self
):
def
children
(
self
):
return
[
self
.
sim
.
nlocal
]
+
([]
if
self
.
local_only
else
[
self
.
sim
.
pbc
.
npbc
])
return
[
self
.
block
,
self
.
sim
.
nlocal
]
+
([]
if
self
.
local_only
else
[
self
.
sim
.
pbc
.
npbc
])
class
While
(
ASTNode
):
class
While
(
ASTNode
):
...
...
This diff is collapsed.
Click to expand it.
src/pairs/ir/visitor.py
+
8
−
1
View file @
ea3310d7
...
@@ -19,7 +19,14 @@ class Visitor:
...
@@ -19,7 +19,14 @@ class Visitor:
if
method
is
not
None
:
if
method
is
not
None
:
method
(
ast_node
)
method
(
ast_node
)
else
:
else
:
self
.
visit_children
(
ast_node
)
for
b
in
type
(
ast_node
).
__bases__
:
method
=
self
.
get_method
(
f
"
visit_
{
b
.
__name__
}
"
)
if
method
is
not
None
:
method
(
ast_node
)
break
if
method
is
None
:
self
.
visit_children
(
ast_node
)
def
visit_children
(
self
,
ast_node
):
def
visit_children
(
self
,
ast_node
):
for
c
in
ast_node
.
children
():
for
c
in
ast_node
.
children
():
...
...
This diff is collapsed.
Click to expand it.
src/pairs/sim/simulation.py
+
2
−
0
View file @
ea3310d7
...
@@ -216,7 +216,9 @@ class Simulation:
...
@@ -216,7 +216,9 @@ class Simulation:
self
.
kernels
self
.
kernels
])
])
self
.
enter
(
timestep
.
block
)
timestep
.
add
(
VTKWrite
(
self
,
self
.
vtk_file
,
timestep
.
timestep
()
+
1
))
timestep
.
add
(
VTKWrite
(
self
,
self
.
vtk_file
,
timestep
.
timestep
()
+
1
))
self
.
leave
()
body
=
Block
.
from_list
(
self
,
[
body
=
Block
.
from_list
(
self
,
[
self
.
setups
,
self
.
setups
,
...
...
This diff is collapsed.
Click to expand it.
src/pairs/sim/timestep.py
+
4
−
1
View file @
ea3310d7
...
@@ -28,16 +28,19 @@ class Timestep:
...
@@ -28,16 +28,19 @@ class Timestep:
stmts
=
item
if
not
isinstance
(
item
,
Block
)
else
item
.
statements
()
stmts
=
item
if
not
isinstance
(
item
,
Block
)
else
item
.
statements
()
stmts_else
=
None
stmts_else
=
None
ts
=
self
.
timestep_loop
.
iter
()
ts
=
self
.
timestep_loop
.
iter
()
self
.
sim
.
enter
(
self
.
block
)
if
item_else
is
not
None
:
if
item_else
is
not
None
:
stmts_else
=
item_else
if
not
isinstance
(
item_else
,
Block
)
else
item_else
.
statements
()
stmts_else
=
item_else
if
not
isinstance
(
item_else
,
Block
)
else
item_else
.
statements
()
if
exec_every
>
0
:
if
exec_every
>
0
:
self
.
block
.
add_statement
(
self
.
block
.
add_statement
(
Branch
(
self
.
sim
,
BinOp
.
cmp
(
ts
%
exec_every
,
0
),
True
if
stmts_else
is
None
else
False
,
Branch
(
self
.
sim
,
BinOp
.
inline
(
BinOp
.
cmp
(
ts
%
exec_every
,
0
)
)
,
True
if
stmts_else
is
None
else
False
,
Block
(
self
.
sim
,
stmts
),
None
if
stmts_else
is
None
else
Block
(
self
.
sim
,
stmts_else
)))
Block
(
self
.
sim
,
stmts
),
None
if
stmts_else
is
None
else
Block
(
self
.
sim
,
stmts_else
)))
else
:
else
:
self
.
block
.
add_statement
(
stmts
)
self
.
block
.
add_statement
(
stmts
)
self
.
sim
.
leave
()
def
as_block
(
self
):
def
as_block
(
self
):
return
Block
(
self
.
sim
,
[
self
.
timestep_loop
])
return
Block
(
self
.
sim
,
[
self
.
timestep_loop
])
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