Skip to content

Commit

Permalink
add markings argument to FunctionMergeBlock.evaluate_tlm (pyadjoint #190
Browse files Browse the repository at this point in the history
) (#3957)
  • Loading branch information
JHopeCollins authored Jan 8, 2025
1 parent 1c60f17 commit 767f5e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion firedrake/adjoint_utils/blocks/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,13 @@ def evaluate_adj_component(self, inputs, adj_inputs, block_variable, idx,
else:
return adj_inputs[0]

def evaluate_tlm(self):
def evaluate_tlm(self, markings=False):
tlm_input = self.get_dependencies()[0].tlm_value
if tlm_input is None:
return
output = self.get_outputs()[0]
if markings and not output.marked_in_path:
return
fs = output.output.function_space()
f = type(output.output)(fs)
output.add_tlm_output(
Expand Down

0 comments on commit 767f5e1

Please sign in to comment.