more phiflow 3.4 updates; warning SoL code not yet working
This commit is contained in:
parent
eda7ba974e
commit
1396482270
@ -134,7 +134,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"try:\n",
|
"try:\n",
|
||||||
" import google.colab # to ensure that we are inside colab\n",
|
" import google.colab # to ensure that we are inside colab\n",
|
||||||
" !pip install --upgrade --quiet phiflow==3.3\n",
|
" !pip install --upgrade --quiet phiflow==3.4\n",
|
||||||
" #!pip install --upgrade --quiet git+https://github.com/tum-pbs/PhiFlow@develop\n",
|
" #!pip install --upgrade --quiet git+https://github.com/tum-pbs/PhiFlow@develop\n",
|
||||||
" \n",
|
" \n",
|
||||||
" # for pbdl-dataset:\n",
|
" # for pbdl-dataset:\n",
|
||||||
@ -172,7 +172,7 @@
|
|||||||
"random.seed(42)\n",
|
"random.seed(42)\n",
|
||||||
"np.random.seed(42)\n",
|
"np.random.seed(42)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"math.seed(42) # phiflow seed\n",
|
"#math.seed(42) # phiflow seed (note, this can cause an error on some backends; activate if possible)\n",
|
||||||
"math.set_global_precision(32) # single precision\n",
|
"math.set_global_precision(32) # single precision\n",
|
||||||
"\n",
|
"\n",
|
||||||
"USE_CPU = 0\n",
|
"USE_CPU = 0\n",
|
||||||
@ -255,7 +255,7 @@
|
|||||||
"\n",
|
"\n",
|
||||||
" # mass conservation (pressure solve)\n",
|
" # mass conservation (pressure solve)\n",
|
||||||
" pressure = None\n",
|
" pressure = None\n",
|
||||||
" velocity, pressure = fluid.make_incompressible(velocity, self.obstacles)\n",
|
" velocity, pressure = fluid.make_incompressible(velocity, self.obstacles, Solve('CG', 1e-3))\n",
|
||||||
" self.solve_info = { 'pressure': pressure, 'advected_velocity': advected_velocity }\n",
|
" self.solve_info = { 'pressure': pressure, 'advected_velocity': advected_velocity }\n",
|
||||||
"\n",
|
"\n",
|
||||||
" return [marker, velocity]\n",
|
" return [marker, velocity]\n",
|
||||||
|
|||||||
@ -84,7 +84,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"!pip install --upgrade --quiet phiflow==3.1\n",
|
"!pip install --upgrade --quiet phiflow==3.4\n",
|
||||||
"from phi.torch.flow import * # switch to TF with \"phi.tf.flow\""
|
"from phi.torch.flow import * # switch to TF with \"phi.tf.flow\""
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user