Changeset f14db26 in tol


Ignore:
Timestamp:
Jan 25, 2009, 6:47:50 PM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
b34c211
Parents:
eca8d89
Message:

New iterative method MinimumResidualsSolve

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

Location:
tol/btol/vmatrix_type
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/vmatrix_type/vmatgra.cpp

    reca8d89 rf14db26  
    18081808  assert(contens_.Check());
    18091809}
     1810
     1811/*------------------------------------------------------------------------------
     1812  vmat_iterative.cpp: Iterative methods for solving linear problems
     1813------------------------------------------------------------------------------*/
     1814
     1815//--------------------------------------------------------------------
     1816DeclareContensClass(BVMat, BVMatTemporary, BVMatMinimumResidualsSolve);
     1817DefExtOpr(1, BVMatMinimumResidualsSolve, "MinimumResidualsSolve",
     1818  2, 4, "VMatrix VMatrix Real VMatrix",
     1819  BText("(VMatrix M, VMatrix B "
     1820  "[, Real chop=")+Sqrt(DEpsilon())+", VMatrix X0=Tra(M)*B])",
     1821  I2("Applies the Minimum Residuals method to solve the linear "
     1822     "system M*X=B begining at initial value <X0> until error were "
     1823     "great than <chop>.",
     1824     "Aplica el metodo de los Minimos Residuos para resolver el "
     1825     "sistema lineal M*X=B comenzando por el valor inicial <X0> y "
     1826     "continuando hasta que el error sea mayor que <chop>."),
     1827    BOperClassify::MatrixAlgebra_);
     1828//--------------------------------------------------------------------
     1829void BVMatMinimumResidualsSolve::CalcContens()
     1830//--------------------------------------------------------------------
     1831{
     1832  BVMat& M = VMat(Arg(1));
     1833  BVMat& B = VMat(Arg(2));
     1834  double chop = -1;
     1835  if(Arg(3)) { chop = Real(Arg(3)); }
     1836  if(Arg(4))
     1837  {
     1838    BVMat& X0 = VMat(Arg(4));
     1839    contens_ = BVMat::MinimumResidualsSolve(M, B, X0, chop);
     1840  }
     1841  else
     1842  {
     1843    contens_ = BVMat::MinimumResidualsSolve(M, B, chop);
     1844  }
     1845}
     1846
    18101847
    18111848/*------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.