changeset 1246:25efceb0c392 feature/dirac_discr

Apply some nitpicking
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 20 Nov 2019 21:02:06 +0100
parents 0a1c64d3c717
children 92c079cf5fbf
files diracDiscr.m diracDiscrCurve.m diracDiscrTest.m
diffstat 3 files changed, 16 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
diff -r 0a1c64d3c717 -r 25efceb0c392 diracDiscr.m
--- a/diracDiscr.m	Wed Nov 20 20:30:45 2019 +0100
+++ b/diracDiscr.m	Wed Nov 20 21:02:06 2019 +0100
@@ -1,12 +1,12 @@
-
+% n-dimensional delta function
+% g: cartesian grid
+% x_s: source point coordinate vector, e.g. [x; y] or [x; y; z].
+% m_order: Number of moment conditions
+% s_order: Number of smoothness conditions
+% H: cell array of 1D norm matrices
 function d = diracDiscr(g, x_s, m_order, s_order, H)
-    % n-dimensional delta function
-    % g: cartesian grid
-    % x_s: source point coordinate vector, e.g. [x; y] or [x; y; z].
-    % m_order: Number of moment conditions
-    % s_order: Number of smoothness conditions
-    % H: cell array of 1D norm matrices
     assertType(g, 'grid.Cartesian');
+    
     dim = g.d;
     d_1D = cell(dim,1);
 
@@ -25,7 +25,6 @@
         d = (d_1D{i}*d')';
         d = d(:);
     end
-
 end
 
 
diff -r 0a1c64d3c717 -r 25efceb0c392 diracDiscrCurve.m
--- a/diracDiscrCurve.m	Wed Nov 20 20:30:45 2019 +0100
+++ b/diracDiscrCurve.m	Wed Nov 20 21:02:06 2019 +0100
@@ -1,12 +1,11 @@
+% 2-dimensional delta function for single-block curvilinear grid
+% x_s:      source point coordinate vector, e.g. [x; y] or [x; y; z].
+% g:        single-block grid containing the source
+% m_order:  Number of moment conditions
+% s_order:  Number of smoothness conditions
+% order:    Order of SBP derivative approximations
+% opSet:    Cell array of function handle to opSet generator
 function d = diracDiscrCurve(x_s, g, m_order, s_order, order, opSet)
-    % 2-dimensional delta function for single-block curvilinear grid
-    % x_s:      source point coordinate vector, e.g. [x; y] or [x; y; z].
-    % g:        single-block grid containing the source
-    % m_order:  Number of moment conditions
-    % s_order:  Number of smoothness conditions
-    % order:    Order of SBP derivative approximations
-    % opSet:    Cell array of function handle to opSet generator
-
     default_arg('order', m_order);
     default_arg('opSet', {@sbp.D2Variable, @sbp.D2Variable});
 
@@ -34,7 +33,6 @@
 
     % Get delta function for logical grid and scale by Jacobian
     d = (1./J).*diracDiscr(g, [uS; vS], m_order, s_order, {H_u, H_v});
-
 end
 
 function J = jacobian(g, opSet, order)
@@ -62,4 +60,4 @@
     y_v = Dv*y;
 
     J = x_u.*y_v - x_v.*y_u;
-end
\ No newline at end of file
+end
diff -r 0a1c64d3c717 -r 25efceb0c392 diracDiscrTest.m
--- a/diracDiscrTest.m	Wed Nov 20 20:30:45 2019 +0100
+++ b/diracDiscrTest.m	Wed Nov 20 21:02:06 2019 +0100
@@ -412,4 +412,4 @@
     for p = 0:mom_cond-1
         fs{p+1} = @(x,y,z) (x/Lx + y/Ly + z/Lz).^p;
     end
-end
\ No newline at end of file
+end