Difference between revisions of "Fdlap.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Created page with "Returns a finite-difference representation of the Laplacian for a 3D array with a user-specified finite difference stencil size. The re- sulting operator is a sparse matrix de...")
 
Line 1: Line 1:
−
Returns a finite-difference representation of the Laplacian for a 3D array with a user-specified finite difference stencil size. The re-
+
{{DISPLAYTITLE:function.m}}
−
sulting operator is a sparse matrix designed to act on the vectorization of the 3D array. The dimensions of the 3D array are assumed to be ordered as [X Y Z]. Syntax:
+
Returns a finite-difference representation of the Laplacian for an array with a user-specified finite difference stencil size. The resulting operator is a sparse matrix designed to act on the vectorisation of the array. The dimensions of the array are assumed to be ordered as [X Y Z].
  
−
                    L=fdlap(npoints,extents,nstenc)
+
==Syntax==
  
−
The following parameters are needed:
+
    L=fdlap(npoints,extents,nstenc)
 +
 
 +
==Arguments==
 +
 
 +
    dims    -  a one-element, two-element, or three-element
 +
                vector specifying the number of discretisation
 +
                points in each dimension of the 1D, 2D, or 3D
 +
                array of data that the operator will be acting
 +
                on, ordered as [X Y Z].
 +
 +
    extents -  a one-element, two-element, or three-element
 +
                vector specifying the size of each dimension
 +
                of the array, ordered as [X Y Z].
 
   
 
   
−
     npoints -  a three-element vector specifying the number of
+
     nstenc  -  number of finite-difference stencil points for
−
                 discretization points in each dimension of the
+
                 the finite-difference approximation; periodic
−
                 3D cube of data that the operator will be acting
+
                 boundary conditions are used
−
                on, ordered as [X Y Z].
+
 
 +
==Outputs==
  
−
     extents -  a three-element vector specifying axis extents,
+
     L      -  a sparse matrix designed to act on the vectori-
−
                 ordered as [X Y Z].
+
                 zation of the 3D array. The dimensions of that
 +
                array are assumed to be ordered as [X Y Z].
  
−
    nstenc  -  number of finite-difference stencil points for
+
==See also==
−
                the finite-difference approximations.
+
[[fdvec.m]], [[fdmat.m]], [[fdhess.m]], [[fdkup.m]], [[fdweights.m]], [[fftdiff.m]], [[fourdif.m]], [[fourlap.m]]
  
−
The resulting operator is a sparse matrix designed to act on the vectorization of rho. The dimensions of rho are assumed to be ordered as [X Y Z].
 
  
−
Note: Dirichlet boundary conditions - the resulting Laplacian should only be used for the inverse Laplacian operation.
+
''Version 2.2, authors: [[Ilya Kuprov]''

Revision as of 15:18, 16 August 2018

Returns a finite-difference representation of the Laplacian for an array with a user-specified finite difference stencil size. The resulting operator is a sparse matrix designed to act on the vectorisation of the array. The dimensions of the array are assumed to be ordered as [X Y Z].

Syntax

    L=fdlap(npoints,extents,nstenc)

Arguments

    dims    -  a one-element, two-element, or three-element 
               vector specifying the number of discretisation
               points in each dimension of the 1D, 2D, or 3D
               array of data that the operator will be acting
               on, ordered as [X Y Z].

    extents -  a one-element, two-element, or three-element 
               vector specifying the size of each dimension
               of the array, ordered as [X Y Z].

    nstenc  -  number of finite-difference stencil points for
               the finite-difference approximation; periodic
               boundary conditions are used

Outputs

    L       -  a sparse matrix designed to act on the vectori-
               zation of the 3D array. The dimensions of that
               array are assumed to be ordered as [X Y Z].

See also

fdvec.m, fdmat.m, fdhess.m, fdkup.m, fdweights.m, fftdiff.m, fourdif.m, fourlap.m


Version 2.2, authors: [[Ilya Kuprov]