Skip to content

Commit 4793125

Browse files
simplify computation of consF
1 parent 85f68e2 commit 4793125

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

perpendicular-flap/fluid-nutils/fluid.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ def main(inflow: 'inflow velocity' = 10,
105105
resF += tt(domain.integral('rho ubasis_ni u_i d:x' @ ns, degree=4))
106106
resF += domain.integral('rho ubasis_ni (u_i,j urel_j d:x)' @ ns, degree=4)
107107
resF += couplinginterface.sample('gauss', 4).integral('ubasis_ni F_i d:x' @ ns)
108-
consF = numpy.isnan(solver.optimize('F', couplinginterface.sample('gauss', 4).integral('F_i F_i' @ ns),
109-
droptol=1e-10))
108+
consF = couplingsample.integrate((ns.ubasis**2).sum(1)) == 0
110109

111110
# boundary conditions mesh displacements
112111
sqr = domain.boundary['inflow,outflow,wall'].integral('d_i d_i' @ ns, degree=2)

0 commit comments

Comments
 (0)