Difference between revisions of "Fdkup.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Created page with "Returns a finite difference representation of the Kuprov operator: K[rho]=-(1/3)*Trace(Hessian[rho]*chi) with the number of stencil points in the finite dif...")
 
Line 1: Line 1:
 +
{{DISPLAYTITLE:fdkup.m}}
 
Returns a finite difference representation of the Kuprov operator:
 
Returns a finite difference representation of the Kuprov operator:
  
 
                 K[rho]=-(1/3)*Trace(Hessian[rho]*chi)
 
                 K[rho]=-(1/3)*Trace(Hessian[rho]*chi)
  
with the number of stencil points in the finite difference approximation specified by user. Syntax:
+
with the number of stencil points in the finite difference approximation specified by user. The resulting operator is a sparse matrix designed to act on the vectorisation of rho. The dimensions of rho are assumed to be ordered as [X Y Z]. For further information, see http://dx.doi.org/10.1039/C4CP03106G.
  
                  K=fdkup(npoints,extents,chi,nstenc)
+
==Syntax==
 +
 
 +
    K=fdkup(npoints,extents,chi,nstenc)
 +
 
 +
==Arguments==
  
The following parameters are needed:
 
 
 
     npoints -  a three-element vector specifying the dimensions
 
     npoints -  a three-element vector specifying the dimensions
 
                 of the 3D cube of data that the operator will be
 
                 of the 3D cube of data that the operator will be
                 acting on, in Angstroms.
+
                 acting on, in Angstroms. The dimensions are assu-
 +
                med to be ordered as [X Y Z].
 +
 +
    chi    -  the electron magnetic susceptibility tensor in
 +
                cubic Angstroms, a symmatric 3x3 matrix.
 +
 +
    extents -  a three-element vector specifying axis extents
 +
                in Angstroms. The dimensions are assumed to be
 +
                ordered as [X Y Z].
 +
 +
    nstenc  -  number of finite-difference stencil points for
 +
                the finite-difference approximation. Periodic
 +
                boundary conditions are used.
  
    chi    -  the electron magnetic susceptibility tensor in
+
==Outputs==
                cubic Angstroms.
 
  
     extents -  a three-element vector specifying axis extents
+
     K      -  a sparse matrix designed to act on the vectori-
                 in Angstroms.
+
                 zation of the array. The dimensions are assumed
 +
                to be ordered as [X Y Z].
  
    nstenc  -  number of finite-difference stencil points for
+
==See also==
                the finite-difference approximations.
+
Links to related functions.
  
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].
 
  
For further details see http://dx.doi.org/10.1039/C4CP03106G.
+
''Version 2.2, authors: [[Gareth Charnock]], [[Ilya Kuprov]]''

Revision as of 15:28, 16 August 2018

Returns a finite difference representation of the Kuprov operator:

                K[rho]=-(1/3)*Trace(Hessian[rho]*chi)

with the number of stencil points in the finite difference approximation specified by user. The resulting operator is a sparse matrix designed to act on the vectorisation of rho. The dimensions of rho are assumed to be ordered as [X Y Z]. For further information, see http://dx.doi.org/10.1039/C4CP03106G.

Syntax

    K=fdkup(npoints,extents,chi,nstenc)

Arguments

    npoints -  a three-element vector specifying the dimensions
               of the 3D cube of data that the operator will be
               acting on, in Angstroms. The dimensions are assu-
               med to be ordered as [X Y Z].

    chi     -  the electron magnetic susceptibility tensor in
               cubic Angstroms, a symmatric 3x3 matrix.

    extents -  a three-element vector specifying axis extents
               in Angstroms. The dimensions are assumed to be
               ordered as [X Y Z].

    nstenc  -  number of finite-difference stencil points for
               the finite-difference approximation. Periodic 
               boundary conditions are used.

Outputs

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

See also

Links to related functions.


Version 2.2, authors: Gareth Charnock, Ilya Kuprov