lib/field/derivative.cc
derivative::derivative(const grid &gridData, const field &F): gridData(gridData), F(F) { 
    tempMat.resize(F.fSize);
    tempMat.reindexSelf(F.flBound);

    invDelx = 1.0/gridData.dXi;
    invDely = 1.0/gridData.dEt;
    invDelz = 1.0/gridData.dZt; 

    fullRange = blitz::Range::all();

    if (F.xStag) {
        x_Metric.reference(gridData.xi_xStaggr);
        xxMetric.reference(gridData.xixxStaggr);
        x2Metric.reference(gridData.xix2Staggr);
    } else {
        x_Metric.reference(gridData.xi_xColloc);
        xxMetric.reference(gridData.xixxColloc);
        x2Metric.reference(gridData.xix2Colloc);
    }

    if (F.yStag) {
        y_Metric.reference(gridData.et_yStaggr);
        yyMetric.reference(gridData.etyyStaggr);
        y2Metric.reference(gridData.ety2Staggr);
    } else {
        y_Metric.reference(gridData.et_yColloc);
        yyMetric.reference(gridData.etyyColloc);
        y2Metric.reference(gridData.ety2Colloc);
    }

    if (F.zStag) {
        z_Metric.reference(gridData.zt_zStaggr);
        zzMetric.reference(gridData.ztzzStaggr);
        z2Metric.reference(gridData.ztz2Staggr);
    } else {
        z_Metric.reference(gridData.zt_zColloc);
        zzMetric.reference(gridData.ztzzColloc);
        z2Metric.reference(gridData.ztz2Colloc);
    }

    tempMat = 0.0;
}
/**
 ********************************************************************************************************************************************
 * \brief   Constructor of the derivative class
 *
 *          The empty constructor of the derivative class only serves to assign values to the two const parameters of the differ class,
 *          namely <B>grid</B> and <B>F</B>.
 *
 * \param   gridData is a const reference to the global data contained in the grid class
 * \param   F is a reference to field on which the derivative operations are to be performed
 ********************************************************************************************************************************************
 */
\brief   Constructor of the derivative class
The empty constructor of the derivative class only serves to assign values to the two const parameters of the differ class,
namely grid and F.

\param   gridData is a const reference to the global data contained in the grid class
\param   F is a reference to field on which the derivative operations are to be performed
\ brief Constructor of the derivative class The empty constructor of the derivative class only serves to assign values to the two const parameters of the differ class namely grid and F . \ param gridData is a const reference to the global data contained in the grid class \ param F is a reference to field on which the derivative operations are to be performed
derivative::derivative(const grid &gridData, const field &F): gridData(gridData), F(F) { 
    tempMat.resize(F.fSize);
    tempMat.reindexSelf(F.flBound);
    invDelx = 1.0/gridData.dXi;
    invDely = 1.0/gridData.dEt;
    invDelz = 1.0/gridData.dZt; 
    fullRange = blitz::Range::all();
    if (F.xStag) {
        x_Metric.reference(gridData.xi_xStaggr);
        xxMetric.reference(gridData.xixxStaggr);
        x2Metric.reference(gridData.xix2Staggr);
    } else {
        x_Metric.reference(gridData.xi_xColloc);
        xxMetric.reference(gridData.xixxColloc);
        x2Metric.reference(gridData.xix2Colloc);
    }
    if (F.yStag) {
        y_Metric.reference(gridData.et_yStaggr);
        yyMetric.reference(gridData.etyyStaggr);
        y2Metric.reference(gridData.ety2Staggr);
    } else {
        y_Metric.reference(gridData.et_yColloc);
        yyMetric.reference(gridData.etyyColloc);
        y2Metric.reference(gridData.ety2Colloc);
    }
    if (F.zStag) {
        z_Metric.reference(gridData.zt_zStaggr);
        zzMetric.reference(gridData.ztzzStaggr);
        z2Metric.reference(gridData.ztz2Staggr);
    } else {
        z_Metric.reference(gridData.zt_zColloc);
        zzMetric.reference(gridData.ztzzColloc);
        z2Metric.reference(gridData.ztz2Colloc);
    }
    tempMat = 0.0;
}
derivative :: derivative ( const grid & gridData , const field & F ) : gridData ( gridData ) , F ( F ) { tempMat . resize ( F . fSize ) ; tempMat . reindexSelf ( F . flBound ) ; invDelx = 1.0 / gridData . dXi ; invDely = 1.0 / gridData . dEt ; invDelz = 1.0 / gridData . dZt ; fullRange = blitz :: Range :: all ( ) ; if ( F . xStag ) { x_Metric . reference ( gridData . xi_xStaggr ) ; xxMetric . reference ( gridData . xixxStaggr ) ; x2Metric . reference ( gridData . xix2Staggr ) ; } else { x_Metric . reference ( gridData . xi_xColloc ) ; xxMetric . reference ( gridData . xixxColloc ) ; x2Metric . reference ( gridData . xix2Colloc ) ; } if ( F . yStag ) { y_Metric . reference ( gridData . et_yStaggr ) ; yyMetric . reference ( gridData . etyyStaggr ) ; y2Metric . reference ( gridData . ety2Staggr ) ; } else { y_Metric . reference ( gridData . et_yColloc ) ; yyMetric . reference ( gridData . etyyColloc ) ; y2Metric . reference ( gridData . ety2Colloc ) ; } if ( F . zStag ) { z_Metric . reference ( gridData . zt_zStaggr ) ; zzMetric . reference ( gridData . ztzzStaggr ) ; z2Metric . reference ( gridData . ztz2Staggr ) ; } else { z_Metric . reference ( gridData . zt_zColloc ) ; zzMetric . reference ( gridData . ztzzColloc ) ; z2Metric . reference ( gridData . ztz2Colloc ) ; } tempMat = 0.0 ; }
\brief   Constructor of the derivative class
          The empty constructor of the derivative class only serves to assign values to the two const parameters of the differ class,
          namely <B>grid</B> and <B>F</B>.
\ brief Constructor of the derivative class The empty constructor of the derivative class only serves to assign values to the two const parameters of the differ class namely <B > grid< / B > and <B > F< / B > .