Skip to content

Commit

Permalink
Modification to models to pass the field access tests
Browse files Browse the repository at this point in the history
  • Loading branch information
llaniewski committed Aug 28, 2023
1 parent 9d7d12d commit 2a9bf77
Show file tree
Hide file tree
Showing 18 changed files with 111 additions and 13 deletions.
7 changes: 7 additions & 0 deletions models/electrokinetic/d2q9_poison_boltzmann/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING



AddDensity( name="g[0]", dx= 0, dy= 0, group="g")
AddDensity( name="g[1]", dx= 1, dy= 0, group="g")
Expand Down
7 changes: 7 additions & 0 deletions models/experimental/d3q27_csf/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING



U = expand.grid(-1:1,-1:1,-1:1)

Expand Down
5 changes: 3 additions & 2 deletions models/flow/auto/Dynamics.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ AddNodeType(name="Body", group="BODY")
for (f in fname) AddField(f,dx=0,dy=0,dz=0) # Make f accessible also in present node (not only streamed)

if (Options$part) {
AddStage("BaseIteration", "Run", save=Fields$group %in% c("f","Force"), load = DensityAll$group %in% c("f","Force"))
AddStage("CalcF", save=Fields$group == "Force", load = DensityAll$group %in% c("f","Force"), particle=TRUE)
AddStage("BaseIteration", "Run", save=Fields$group %in% c("f"), load = DensityAll$group %in% c("f","Force"))
AddStage("BaseInit", "Init", save=Fields$group %in% c("f"))
AddStage("CalcF", save=Fields$group == "Force", load = DensityAll$group %in% c("f"), particle=TRUE)
AddAction("Iteration", c("BaseIteration", "CalcF"))
AddAction("Init", c("BaseInit", "CalcF"))
}
Expand Down
7 changes: 7 additions & 0 deletions models/flow/d2q9_par/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING


# Density - table of variables of LB Node to stream
# name - variable name to stream
# dx,dy,dz - direction of streaming
Expand Down
7 changes: 7 additions & 0 deletions models/flow/d3q27_cumulant_part/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING


x = c(0,1,-1);
P = expand.grid(x=0:2,y=0:2,z=0:2)
U = expand.grid(x,x,x)
Expand Down
7 changes: 7 additions & 0 deletions models/heat/d3q27_tePSM_per/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING



AddDensity( name="f[0]", dx= 0, dy= 0, dz= 0, group="f")
AddDensity( name="f[1]", dx= 1, dy= 0, dz= 0, group="f")
Expand Down
7 changes: 7 additions & 0 deletions models/multiphase/d2q9_ShanChen/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING



# Fluid Density Populations
AddDensity( name="f[0]", dx= 0, dy= 0, group="f")
Expand Down
7 changes: 7 additions & 0 deletions models/multiphase/d2q9_csf/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING


# Density - table of variables of LB Node to stream
# name - variable name to stream
# dx,dy,dz - direction of streaming
Expand Down
2 changes: 1 addition & 1 deletion models/multiphase/d2q9_kuper/Dynamics.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AddField("phi",stencil2d=1);

AddStage("BaseIteration", "Run", save=Fields$group == "f", load=DensityAll$group == "f")
AddStage("CalcPhi", save="phi",load=DensityAll$group == "f")
AddStage("BaseInit", "Init", save=Fields$group == "f", load=DensityAll$group == "f")
AddStage("BaseInit", "Init", save=Fields$group == "f")

AddAction("Iteration", c("BaseIteration","CalcPhi"))
AddAction("Init", c("BaseInit","CalcPhi"))
Expand Down
17 changes: 8 additions & 9 deletions models/multiphase/d2q9_pf/Dynamics.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,16 @@ if (Options$fd) {
AddField("phi" ,stencil2d=1 );

AddStage("BaseIteration", "Run",
load=DensityAll$group == "h" | DensityAll$group == "f" | DensityAll$group == "BC",
save=Fields$group=="h" | Fields$group=="f"
)
load=DensityAll$group == "h" | DensityAll$group == "f" | DensityAll$group == "BC",
save=Fields$group=="h" | Fields$group=="f" | Fields$group == "BC"
)
AddStage("CalcPhi",
save=Fields$name=="phi" ,
load=DensityAll$group == "h"
)
save=Fields$name=="phi" ,
load=DensityAll$group == "h"
)
AddStage("BaseInit", "Init",
load=DensityAll$group == "BC",
save=Fields$group=="h" | Fields$group == "f"

load=FALSE,
save=Fields$group=="h" | Fields$group == "f" | Fields$group == "BC"
)
AddAction("Iteration", c("BaseIteration","CalcPhi"))
AddAction("Init", c("BaseInit","CalcPhi"))
Expand Down
7 changes: 7 additions & 0 deletions models/multiphase/d2q9_pf_pressureEvolution/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING


# Density - table of variables of LB Node to stream
# name - variable name to stream
# dx,dy,dz - direction of streaming
Expand Down
7 changes: 7 additions & 0 deletions models/multiphase/d2q9_pf_velocity/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING


# Density - table of variables of LB Node to stream
# Pressure Evolution:
AddDensity( name="g[0]", dx= 0, dy= 0, group="g")
Expand Down
7 changes: 7 additions & 0 deletions models/multiphase/d2q9_scmp/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING



AddDensity( name="f[0]", dx= 0, dy= 0, group="f")
AddDensity( name="f[1]", dx= 1, dy= 0, group="f")
Expand Down
2 changes: 1 addition & 1 deletion models/multiphase/d3q19_kuper/Dynamics.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ AddField("phi",stencil3d=1);

AddStage("BaseIteration", "Run", save=Fields$group == "f", load=DensityAll$group == "f")
AddStage("CalcPhi", save="phi",load=DensityAll$group == "f")
AddStage("BaseInit", "Init", save=Fields$group == "f", load=DensityAll$group == "f")
AddStage("BaseInit", "Init", save=Fields$group == "f")

AddAction("Iteration", c("BaseIteration","CalcPhi"))
AddAction("Init", c("BaseInit","CalcPhi"))
Expand Down
7 changes: 7 additions & 0 deletions models/multiphase/d3q27_pf_velocity/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING


# Density - table of variables of LB Node to stream
# Velocity-based Evolution d3q27:
source("lattice.R")
Expand Down
7 changes: 7 additions & 0 deletions models/multiphase/experimental/d2q9_pp_LBL/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING


# Fluid Density Populations
AddDensity( name="f[0]", dx= 0, dy= 0, group="f")
AddDensity( name="f[1]", dx= 1, dy= 0, group="f")
Expand Down
7 changes: 7 additions & 0 deletions models/multiphase/experimental/d2q9_pp_MCMP/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING


# Density - table of variables of LB Node to stream
AddDensity( name="f[0]", dx= 0, dy= 0, group="f")
AddDensity( name="f[1]", dx= 1, dy= 0, group="f")
Expand Down
7 changes: 7 additions & 0 deletions models/reaction/d2q9_reaction_diffusion_system/Dynamics.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Setting permissive access policy.
# * This skips checks of fields being overwritten or read prematurely.
# * Otherwise the model compilation was failing.
# * This should be removed if the issue is fixed
SetOptions(permissive.access=TRUE) ### WARNING


if (Options$AllenCahn) {
Qname = 'Allen-Cahn'
DREs <- ('PHI')
Expand Down

0 comments on commit 2a9bf77

Please sign in to comment.