diff +rv/+diffops/addClosuresToDiffOp.m @ 1190:79618b58b0a0 feature/rv

Refactor constructDiffops and remove closures from some of the diffops used to compute the residual.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Mon, 08 Jul 2019 15:12:19 +0200
parents 65a577db5ca0
children
line wrap: on
line diff
--- a/+rv/+diffops/addClosuresToDiffOp.m	Mon Jul 08 14:50:46 2019 +0200
+++ b/+rv/+diffops/addClosuresToDiffOp.m	Mon Jul 08 15:12:19 2019 +0200
@@ -1,8 +1,7 @@
-function [D, penalties] = addClosuresToDiffOp(diffOp, D, BCs)
-    penalties = cell(size(BCs));
-    for i = 1:size(BCs,1)
-        for j = 1:size(BCs,2)
-            [closure, penalties{i,j}] = diffOp.boundary_condition(BCs{i,j}.boundary, BCs{i,j}.type);
+function D = addClosuresToDiffOp(D, closures)
+    for i = 1:size(closures,1)
+        for j = 1:size(closures,2)
+            closure = closures{i,j};
             if ~isa(closure, 'function_handle')
                 closure = @(v) closure*v;
             end