Skip to content

Commit

Permalink
assemble(1form, tensor=..) requires cofunction (#388)
Browse files Browse the repository at this point in the history
assemble(1form, tensor=..) requires cofunction

This is now strictly checked in Firedrake
  • Loading branch information
stephankramer authored Jan 31, 2025
1 parent d2ae4fe commit 6ba89f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions thetis/timeintegrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ def __init__(self, equation, solution, fields, dt, options, bnd_conditions, term

fs = self.equation.function_space
self.solution_old = Function(fs, name='old solution')
self.msolution_old = Function(fs, name='dual solution')
self.rhs_func = Function(fs, name='rhs linear form')
self.msolution_old = Cofunction(fs.dual(), name='dual solution')
self.rhs_func = Cofunction(fs.dual(), name='rhs linear form')

# fully explicit evaluation
self.a = self.equation.mass_term(self.equation.trial)
Expand Down Expand Up @@ -639,9 +639,9 @@ def __init__(self, equation, solution, fields, dt, options, bnd_conditions, term
super(SSPRK22ALE, self).__init__(equation, solution, fields, dt, options)

fs = self.equation.function_space
self.mu = Function(fs, name='dual solution')
self.mu_old = Function(fs, name='dual solution')
self.tendency = Function(fs, name='tendency')
self.mu = Cofunction(fs.dual(), name='dual solution')
self.mu_old = Cofunction(fs.dual(), name='dual solution')
self.tendency = Cofunction(fs.dual(), name='tendency')

# fully explicit evaluation
self.a = self.equation.mass_term(self.equation.trial)
Expand Down

0 comments on commit 6ba89f8

Please sign in to comment.