Skip to content

Commit 2d3a6b3

Browse files
switch to uniform sample
1 parent 909f85a commit 2d3a6b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

perpendicular-flap/fluid-nutils/fluid.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# for details on this solver see https://doi.org/10.1002/nme.6443
99

10-
def main(inflow=10., viscosity=1., density=1., theta=.5, timestepsize=.01):
10+
def main(inflow=10., viscosity=1., density=1., theta=.5, timestepsize=.01, npoints_per_elem=3):
1111

1212
# mesh and geometry definition
1313
topo, geom = mesh.rectilinear([
@@ -52,7 +52,7 @@ def main(inflow=10., viscosity=1., density=1., theta=.5, timestepsize=.01):
5252
ns.urel_i = 'ubasis_ni ?lhs_n' # relative velocity
5353
ns.u_i = 'umesh_i + urel_i' # total velocity
5454
ns.p = 'pbasis_n ?lhs_n' # pressure
55-
ns.qw = couplingsample.asfunction(numpy.concatenate([p.weights for p in couplingsample.points]))
55+
ns.qw = 1 / npoints_per_elem
5656

5757
# for visualization
5858
bezier = domain.sample('bezier', 2)

0 commit comments

Comments
 (0)