Skip to content

Commit

Permalink
copy quadrature from prior basis
Browse files Browse the repository at this point in the history
  • Loading branch information
gdmcbain committed Jan 7, 2021
1 parent 6996d44 commit 55a0a75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/examples/ex27.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(self,
for variable, e in self.element.items()}
self.basis['inlet'] = FacetBasis(self.mesh, self.element['u'],
facets=self.mesh.boundaries['inlet'])
self.basis['psi'] = InteriorBasis(self.mesh, ElementTriP2(), intorder=3)
self.basis['psi'] = InteriorBasis(self.mesh, ElementTriP2(), quadrature=self.basis['u'].quadrature)
self.D = np.concatenate([b.all() for b in self.basis['u'].find_dofs().values()])

A = asm(vector_laplace, self.basis['u'])
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ex30.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def dilatation(pressure: np.ndarray) -> np.ndarray:

velocity = flow(pressure)

basis['psi'] = InteriorBasis(mesh, ElementQuad2(), intorder=3)
basis['psi'] = InteriorBasis(mesh, ElementQuad2(), quadrature=basis['u'].quadrature)
psi = np.zeros(A.shape[0])
vorticity = asm(rot, basis['psi'], w=basis['u'].interpolate(velocity))
psi = solve(*condense(asm(laplace, basis['psi']), vorticity, D=basis['psi'].find_dofs()))
Expand Down

0 comments on commit 55a0a75

Please sign in to comment.