Toast++  1.0.2 (r.539)
Forward and inverse modelling in optical tomography
Functions
Jacobian matrix calculation

Functions

STOASTLIB void GenerateJacobian (const Raster *raster, const QMMesh *mesh, const CCompRowMatrix &mvec, const CVector *dphi, const CVector *aphi, DataScale dscale, RDenseMatrix &J)
 Generate Jacobian matrix of forward operator (complex case) More...
 
STOASTLIB void GenerateJacobian (const Raster *raster, const QMMesh *mesh, const CVector *dphi, const CVector *aphi, const CVector *proj, DataScale dscale, RDenseMatrix &J)
 Generate Jacobian matrix of forward operator (complex case) More...
 
STOASTLIB void GenerateJacobian_cw (const Raster *raster, const QMMesh *mesh, const RVector *dphi, const RVector *aphi, RDenseMatrix *Jmua=NULL, RDenseMatrix *Jkap=NULL)
 Generate raw Jacobian matrix for CW intensity data (real case) More...
 
STOASTLIB void GenerateJacobian_cw (const Raster *raster, const QMMesh *mesh, const RCompRowMatrix &mvec, const RVector *dphi, const RVector *aphi, DataScale dscale, RDenseMatrix *Jmua=NULL, RDenseMatrix *Jkap=NULL)
 Generate Jacobian matrix for CW intensity data (real case). More...
 
STOASTLIB void GenerateJacobian_cw (const Raster *raster, const QMMesh *mesh, const RVector *dphi, const RVector *aphi, const RVector *proj, DataScale dscale, RDenseMatrix *Jmua=NULL, RDenseMatrix *Jkap=NULL)
 Generate mua Jacobian matrix for CW intensity data (real case). More...
 
STOASTLIB void GenerateJacobian (const Raster *raster, const QMMesh *mesh, const CCompRowMatrix &mvec, const CVector *dphi, const CVector *aphi, DataScale dscale, RDenseMatrixMPI &Jmod, RDenseMatrixMPI &Jarg)
 Generate Jacobian matrix of forward operator (complex case) More...
 
STOASTLIB void GenerateJacobian (const Raster *raster, const QMMesh *mesh, const CVector *dphi, const CVector *aphi, const CVector *proj, DataScale dscale, RDenseMatrixMPI &Jmod, RDenseMatrixMPI &Jarg)
 Generate Jacobian matrix of forward operator (complex case) More...
 
STOASTLIB void GenerateJacobian_cw_mua (const Raster *raster, const QMMesh *mesh, const RCompRowMatrix &mvec, const RVector *dphi, const RVector *aphi, DataScale dscale, RDenseMatrixMPI &J)
 Generate Jacobian matrix for CW intensity data (real case). More...
 

Detailed Description

This section contains functions that calculate the Jacobian matrix for the frequency-domain diffusion equation, in terms of absorption and diffusion coefficient, and either for real and imaginary parts of the complex data, or for log amplitude and phase.

Function Documentation

STOASTLIB void GenerateJacobian ( const Raster raster,
const QMMesh mesh,
const CCompRowMatrix mvec,
const CVector dphi,
const CVector aphi,
DataScale  dscale,
RDenseMatrixMPI Jmod,
RDenseMatrixMPI Jarg 
)

Generate Jacobian matrix of forward operator (complex case)

Parameters
rastersolution basis mapper, or NULL to generate the Jacobian directly on the forward mesh
meshFEM forward mesh
mvecmeasurement vectors (rows of sparse matrix)
dphiarray of forward fields
aphiarray of adjoint fields
dscaledata scaling flag (lin/log)
JmodJacobian (log amplitude block)
JargJacobian (phase block)
Note
This version generates the boundary projection values on the fly from mvec, if required (i.e. if using log data).
STOASTLIB void GenerateJacobian ( const Raster raster,
const QMMesh mesh,
const CCompRowMatrix mvec,
const CVector dphi,
const CVector aphi,
DataScale  dscale,
RDenseMatrix J 
)

Generate Jacobian matrix of forward operator (complex case)

Parameters
rastersolution basis mapper, or NULL to generate the Jacobian directly on the forward mesh
meshFEM forward mesh
mvecmeasurement vectors (rows of sparse matrix)
dphiarray of forward fields
aphiarray of adjoint fields
dscaledata scaling flag (lin/log)
JJacobian
elbasis(only used if raster==0) If true, returned Jacobian is generated for piecewise constant element basis rather than shape function basis
Note
This version generates the boundary projection values on the fly from mvec, if required (i.e. if using log data).
STOASTLIB void GenerateJacobian ( const Raster raster,
const QMMesh mesh,
const CVector dphi,
const CVector aphi,
const CVector proj,
DataScale  dscale,
RDenseMatrixMPI Jmod,
RDenseMatrixMPI Jarg 
)

Generate Jacobian matrix of forward operator (complex case)

Parameters
rastersolution basis mapper, or NULL to generate the Jacobian directly on the forward mesh
meshFEM forward mesh
mvecmeasurement vectors (rows of sparse matrix)
dphiarray of forward fields
aphiarray of adjoint fields
dscaledata scaling flag (lin/log)
JmodJacobian (log amplitude block)
JargJacobian (phase block)
Note
This version passes the boundary projection values as input arguments.
STOASTLIB void GenerateJacobian ( const Raster raster,
const QMMesh mesh,
const CVector dphi,
const CVector aphi,
const CVector proj,
DataScale  dscale,
RDenseMatrix J 
)

Generate Jacobian matrix of forward operator (complex case)

Parameters
rastersolution basis mapper, or NULL to generate the Jacobian directly on the forward mesh
meshFEM forward mesh
dphiarray of forward fields
aphiarray of adjoint fields
dscaledata scaling flag (lin/log)
JJacobian
elbasis(only used if raster==0) If true, returned Jacobian is generated for piecewise constant element basis rather than shape function basis
Note
This version passes the boundary projection values as input arguments.
STOASTLIB void GenerateJacobian_cw ( const Raster raster,
const QMMesh mesh,
const RVector dphi,
const RVector aphi,
RDenseMatrix Jmua = NULL,
RDenseMatrix Jkap = NULL 
)

Generate raw Jacobian matrix for CW intensity data (real case)

Parameters
[in]rastersolution basis mapper, or NULL to generate the Jacobian directly on the forward mesh
[in]meshFEM forward mesh
[in]dphiarray of direct fields
[in]aphiarray of adjoint fields
[out]Jmuapointer to Jacobian matrix (absorption component), or NULL if not required
[out]Jkappointer to Jacobian matrix (diffusion component), or NULL if not required
Note
This version performs no data or parameter scaling or mapping to logarithmic values. It calculates dy/dx, where y are boundary cw intensity data, and x is mua (absorption) and/or kappa (diffusion).
If Jmua == NULL or Jkap == NULL, then the corresponding component is not calculated.
STOASTLIB void GenerateJacobian_cw ( const Raster raster,
const QMMesh mesh,
const RCompRowMatrix mvec,
const RVector dphi,
const RVector aphi,
DataScale  dscale,
RDenseMatrix Jmua = NULL,
RDenseMatrix Jkap = NULL 
)

Generate Jacobian matrix for CW intensity data (real case).

Parameters
[in]rastersolution basis mapper, or NULL to generate the Jacobian directly on the forward mesh
[in]meshFEM forward mesh
[in]mvecmeasurement vectors (rows of sparse matrix)
[in]dphiarray of forward fields
[in]aphiarray of adjoint fields
[in]dscaledata scaling flag (lin/log)
[out]JmuaJacobian matrix (absorption component)
[out]JkapJacobian matrix (diffusion component)
Note
This version generates the boundary projection values on the fly from mvec, if required (i.e. if using log data).
If Jmua == NULL or Jkap == NULL, then the corresponding component is not calculated.
If dscale == DATA_LOG, then the Jacobian is calculated in terms of logarithmic amplitude (d log y)/dx.
STOASTLIB void GenerateJacobian_cw ( const Raster raster,
const QMMesh mesh,
const RVector dphi,
const RVector aphi,
const RVector proj,
DataScale  dscale,
RDenseMatrix Jmua = NULL,
RDenseMatrix Jkap = NULL 
)

Generate mua Jacobian matrix for CW intensity data (real case).

Parameters
[in]rastersolution basis mapper, or NULL to generate the Jacobian directly on the forward mesh
[in]meshFEM forward mesh
[in]dphiarray of forward fields
[in]aphiarray of adjoint fields
[in]dscaledata scaling flag (lin/log)
[out]JmuaJacobian matrix (absorption component)
[out]JkapJacobian matrix (diffusion component)
Note
This version passes the boundary projection values as input arguments.
If Jmua == NULL or Jkap == NULL, then the corresponding component is not calculated.
If dscale == DATA_LOG, then the Jacobian is calculated in terms of logarithmic amplitude (d log y)/dx.
STOASTLIB void GenerateJacobian_cw_mua ( const Raster raster,
const QMMesh mesh,
const RCompRowMatrix mvec,
const RVector dphi,
const RVector aphi,
DataScale  dscale,
RDenseMatrixMPI J 
)

Generate Jacobian matrix for CW intensity data (real case).

Parameters
rastersolution basis mapper, or NULL to generate the Jacobian directly on the forward mesh
meshFEM forward mesh
mvecmeasurement vectors (rows of sparse matrix)
dphiarray of forward fields
aphiarray of adjoint fields
dscaledata scaling flag (lin/log)
JJacobian
Note
This version generates the boundary projection values on the fly from mvec, if required (i.e. if using log data).