Пример #1
0
void L2SysSurResol::Indexee_EcrireDansMatrWithQuad
     (
            ElMatrix<double> &aMatr,
            const std::vector<cSsBloc> &  aVx,
            const std::vector<cSsBloc> &  aVy
     )  const
{
   // cGenSysSurResol::Indexee_EcrireDansMatrWithQuad(aMatr,aVx,aVy);

    double ** aDOut = aMatr.data();
    int xout=0;
    for (int aKx=0 ; aKx <int(aVx.size()) ; aKx++)
    {
        const cSsBloc & aBlX = aVx[aKx];
        int aI0x = aBlX.I0AbsSolve();
        int aNbX = aBlX.Nb();
        int yout=0;
        for (int aKy=0 ; aKy <int(aVy.size()) ; aKy++)
        {
            const cSsBloc & aBlY = aVy[aKy];
            int aI0y = aVy[aKy].I0AbsSolve();
            if ((aI0x>=aI0y) || (!mOptSym))
            {
                int aI1y = aBlY.I1AbsSolve();
                for (int aYIn=aI0y ; aYIn<aI1y ; aYIn++)
                {
                    memcpy
                    (
                        aDOut[yout]+xout,
                        mDatatLi_Li[aYIn]+aI0x,
                        aNbX*sizeof(double)
                    );
                    yout++;
                }
            }
            else
            {
                yout += aBlY.Nb();
            }
        }
        xout += aNbX;
    }

}
Пример #2
0
void L2SysSurResol::Indexee_EcrireDansMatrColWithLin
              (ElMatrix<double> &aMatr,const std::vector<cSsBloc> &  aVy) const
{

   // cGenSysSurResol::Indexee_EcrireDansMatrColWithLin(aMatr,aVy);

    double ** aDOut = aMatr.data();
    int yout = 0;
    for (int aKy=0 ; aKy <int(aVy.size()) ; aKy++)
    {
        int aI0y = aVy[aKy].I0AbsSolve();
        int aI1y = aVy[aKy].I1AbsSolve();
        for (int yin = aI0y; yin < aI1y ; yin++)
        {
            aDOut[yout][0] = mDatabi_Li[yin];
            yout ++;
        }
    }

}
Пример #3
0
void  L2SysSurResol::SoutraitProduc3x3
     ( 
                          bool                   Sym,
                          ElMatrix<double> &aM1, 
                          ElMatrix<double> &aM2, 
                          const std::vector<cSsBloc> * aYVSB

     )
{
   double ** aData1 = aM1.data();
   double ** aData2 = aM2.data();

   double * aL2A = aData2[0];
   double * aL2B = aData2[1];
   double * aL2C = aData2[2];
   int aNbBl = aYVSB->size();
   int Y0InBloc = 0;
   for (int aKBly=0 ; aKBly <aNbBl ; aKBly++)
   {
        const cSsBloc & aBlY = (*aYVSB)[aKBly];
        const cIncIntervale * aIntY  = aBlY.Intervale();
        int aNumBlocIntervY    = aIntY->NumBlocSolve();

        int aI0y = aBlY.I0AbsSolve();
        int aI1y = aBlY.I1AbsSolve();

        int X0InBloc =0;
        for (int aKBlx=0 ; aKBlx <aNbBl ; aKBlx++)
        {
            const cSsBloc & aBlX = (*aYVSB)[aKBlx];
            const cIncIntervale * aIntX  = aBlX.Intervale();
            int aNumBlocIntervX    = aIntX->NumBlocSolve();
            if ((!mOptSym) || (aNumBlocIntervX>=aNumBlocIntervY))
            {
               int aI0x = aBlX.I0AbsSolve();
               int aI1x = aBlX.I1AbsSolve();
               int yin = Y0InBloc;

               for (int aYOut = aI0y; aYOut<aI1y ; aYOut++,yin++)
               {
                   double * aLineOut = mDatatLi_Li[aYOut];
                   double A1 = aData1[yin][0];
                   double B1 = aData1[yin][1];
                   double C1 = aData1[yin][2];

                   int aDebX  = (mOptSym && (aNumBlocIntervX==aNumBlocIntervY)) ? aYOut : aI0x;

                   int xin = X0InBloc + aDebX-aI0x;
                   for (int XOut = aDebX ; XOut<aI1x ; XOut++)
                   {
                        aLineOut[XOut] -= A1 * aL2A[xin] + B1 * aL2B[xin] + C1 *aL2C[xin];
                       xin++;
                   }
               }

            }
            X0InBloc += aBlX.Nb();
        }

        Y0InBloc += aBlY.Nb();
   }
}
Пример #4
0
void cGenSysSurResol::SoutraitProduc3x3
     ( 
                          bool                   Sym,
                          ElMatrix<tSysCho> &aM1,
                          ElMatrix<tSysCho> &aM2,
                          const std::vector<cSsBloc> * aYVSB

     )
{
// std::cout << "AV 333x3333\n";

    tSysCho ** aData1 = aM1.data();
    tSysCho ** aData2 = aM2.data();

    tSysCho * aL2A = aData2[0];
    tSysCho * aL2B = aData2[1];
    tSysCho * aL2C = aData2[2];


/*
   // std::cout << "AAAAAAAAAAAAAAAAaakkkkkkkkkkkkkk\n";
   if ((!aYVSB) ||   (aYVSB->size()!=1))
   {
       std::cout << "aYVSB: " << aYVSB << "\n";
       std::cout << " size: " << aYVSB->size() << "\n";
       ELISE_ASSERT(aYVSB && (aYVSB->size()==1),"cGenSysSurResol::SoutraitProduc3x3");
   }
*/
       ELISE_ASSERT(aYVSB,"cGenSysSurResol::SoutraitProduc3x3");

       int aY=0;
       for (int aKBy=0 ; aKBy <int(aYVSB->size()) ; aKBy++)
       {
           const cSsBloc &  aBlY = (*aYVSB)[aKBy];
           for (int aKy=aBlY.I0AbsSolve() ; aKy <aBlY.I1AbsSolve() ; aKy++)
           {
              int aDebX = Sym ? aY : 0;
              tSysCho A1 = aData1[aY][0];
              tSysCho B1 = aData1[aY][1];
              tSysCho C1 = aData1[aY][2];

              int aX=0;

              for (int aKBx=0 ; aKBx <int(aYVSB->size()) ; aKBx++)
              {
                  const cSsBloc &  aBlX = (*aYVSB)[aKBx];
                  for (int aKx=aBlX.I0AbsSolve() ; aKx <aBlX.I1AbsSolve() ; aKx++)
                  {
                      if (aX>=aDebX)
                      {
	                 SetElemQuad(aKx,aKy,GetElemQuad(aKx,aKy) -(A1 * aL2A[aX] + B1 * aL2B[aX] + C1 *aL2C[aX]));
                      }
                      aX++;
                  }
              }
/*
              for (int aKx=aDebX ; aKx <int(aVIndy.size()) ; aKx++)
              {
	          GetElemQuad(aVIndy[aKx],aVIndy[aKy]) -= A1 * aL2A[aKx] + B1 * aL2B[aKx] + C1 *aL2C[aKx];
              }
*/
              aY++;
           }
       }

/*
    for (int aKy=0 ; aKy <int(aVIndy.size()) ; aKy++)
    {
        int aDebX = Sym ? aKy : 0;
        double A1 = aData1[aKy][0];
        double B1 = aData1[aKy][1];
        double C1 = aData1[aKy][2];

        for (int aKx=aDebX ; aKx <int(aVIndy.size()) ; aKx++)
        {
	    GetElemQuad(aVIndy[aKx],aVIndy[aKy]) -= A1 * aL2A[aKx] + B1 * aL2B[aKx] + C1 *aL2C[aKx];
        }
    }
*/


// std::cout << "AV 333x3333\n";
}