Changeset 681fb68 in tol


Ignore:
Timestamp:
Feb 9, 2010, 10:29:16 AM (17 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
5e3cfca
Parents:
9e75438
Message:

Fixed #786

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@1997 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/bmodel/modcalc.cpp

    r9e75438 r681fb68  
    162162//--------------------------------------------------------------------
    163163BBool ApplyPolB(BArray<BDat>& ps, const BArray<BDat>& s,
    164                 const BPol& p_, BInt deg, const BText& name)
     164                const BPol& p_, BInt deg, const BText& name, int maxTransferDegree)
    165165//--------------------------------------------------------------------
    166166{
    … …  
    178178    }
    179179//  Std(BText("  ps[")+j+"]="+ps[j].Name()+"\n");
    180     if(ps(j).IsUnknown() && ok)
     180    if(ok && (j>=maxTransferDegree) && ps(j).IsUnknown())
    181181    {
    182182      Error(name+ I2(" has unknown data at ",
    … …  
    191191//--------------------------------------------------------------------
    192192static BBool ApplyPolB(BMat& ps, int rPs, const BMat& s, int rS,
    193                        const BPol& p_, BInt deg, const BText& name)
     193                       const BPol& p_, BInt deg, const BText& name, int maxTransferDegree)
    194194//--------------------------------------------------------------------
    195195{
    … …  
    207207    }
    208208//  Std(BText("  ps[")+j+"]="+ps[j].Name()+"\n");
    209     if(ps(rPs,j).IsUnknown() && ok)
     209    if(ok && (j>=maxTransferDegree) && ps(rPs,j).IsUnknown())
    210210    {
    211211      Error(name+ I2(" has unknown data at ",
    … …  
    220220//--------------------------------------------------------------------
    221221BBool ApplyPolB(BMat& ps, int row, const BData& s,
    222                 const BPol& p_, BInt deg, const BText& name)
     222                const BPol& p_, BInt deg, const BText& name, int maxTransferDegree)
    223223//--------------------------------------------------------------------
    224224{
    … …  
    236236    }
    237237//  Std(BText("  ps[")+j+"]="+ps[j].Name()+"\n");
    238     if(ps(row,j).IsUnknown() && ok)
     238    if(ok && (j>=maxTransferDegree) && ps(row,j).IsUnknown())
    239239    {
    240240      Error(name+ I2(" has unknown data at ",
    … …  
    350350      N_ = outData_.NumDates()-difDeg_;
    351351      outDifData_.Alloc(1, N_);
    352       ApplyPolB(outDifData_, 0, fullData_, dif_, difDeg_, outName_+"_Full");
     352      ApplyPolB(outDifData_, 0, fullData_, dif_, difDeg_, outName_+"_Full", 0);
    353353      Z_ = outDifData_.T();
    354354      initialError_ = Sqrt(CenterMoment(outDifData_.Data(),2));
    … …  
    418418                   n+=transfer_(i).Size();
    419419                   if(!ApplyPolB(inDifData_,i,inData_.Data(),i,dif_,
    420                           difDeg_,inpName_(i)))
     420                          difDeg_,inpName_(i),maxTransferDegree_))
    421421                   { ok = BFALSE; }
    422422                 }
    … …  
    806806//    { Std(nli.Date(j).Name()+"\t"+nli.Data()[0][j].Name()+"\n"); }
    807807
    808       if(ApplyPolB(inDifNonLin_, nli.Data().Data(), dif_, difDeg_, name))
     808      if(ApplyPolB(inDifNonLin_, nli.Data().Data(), dif_, difDeg_, name, 0))
    809809      { for(j=0; j<size; j++) { inputDifFilter_(j)+=inDifNonLin_(j); } }
    810810      else
    … …  
    12501250  BInt j;
    12511251
    1252   ApplyPolB(outDifData_, 0, fullData_, dif_, difDeg_, outName_+"_Full");
     1252  ApplyPolB(outDifData_, 0, fullData_, dif_, difDeg_, outName_+"_Full", 0);
    12531253  Z_ = outDifData_.T();
    12541254  if(inputParam_)
Note: See TracChangeset for help on using the changeset viewer.