Skip to content

Commit

Permalink
Added patch list as input argument
Browse files Browse the repository at this point in the history
  • Loading branch information
rafavzqz committed Jul 17, 2024
1 parent cbb8296 commit 81249e9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions geopdes/inst/multipatch/@sp_multipatch_C1/op_gradfu_gradv_mp.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,20 @@
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.

function [A, B] = op_gradfu_gradv_mp (space, msh, uhat, f, df)
function [A, B] = op_gradfu_gradv_mp (space, msh, uhat, f, df, patch_list)

if (nargin < 6)
patch_list = 1:msh.npatch;
end

if ((space.npatch ~= msh.npatch))
error ('op_gradfu_gradv_mp: the number of patches does not coincide')
end

A = spalloc (space.ndof, space.ndof, 3*space.ndof);
B = spalloc (space.ndof, space.ndof, 6*space.ndof);

for iptc = 1:msh.npatch
for iptc = patch_list
[Cpatch_u, Cpatch_cols_u] = sp_compute_Cpatch (space, iptc);
u_ptc = Cpatch_u * uhat(Cpatch_cols_u);

Expand Down

0 comments on commit 81249e9

Please sign in to comment.