Changeset 0dd5bc2a in tol


Ignore:
Timestamp:
Dec 9, 2009, 8:53:28 AM (17 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
0fc887a
Parents:
8210abe
Message:

Adding integration methods

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

Location:
tol_pkg/FunRn2R
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tol_pkg/FunRn2R/BaseC2.Monomial.tol

    r8210abe r0dd5bc2a  
    125125      })
    126126    })
     127  };
     128  ////////////////////////////////////////////////////////////////////////////
     129  Static Text _.autodoc.member._build.partial.integrate.1.v =
     130  "Evaluates the first partial integration of k-th basic function for an "
     131  "array of points given as the rows of a matrix";
     132  VMatrix _build.partial.integrate.1.v(Real k, VMatrix X, Real i)
     133  ////////////////////////////////////////////////////////////////////////////
     134  {
     135  //WriteLn("TRACE @BaseC2.Monomial::_build.partial.integrate.1.v");
     136    Real d = _.degComb[k][i];
     137    VMatrix aux = (RPow(SubCol(X,[[i]]),d+1)/(d+1));
     138    If(!Card(_.range.der.1[i]),aux,aux $*
     139    BinGroup("$*", EvalSet(_.range.der.1[i], VMatrix rd1(Real h)
     140    {
     141      RPow(SubCol(X,[[h]]),_.degComb[k][h])
     142    })))
    127143  }
    128144
  • tol_pkg/FunRn2R/BaseC2.tol

    r8210abe r0dd5bc2a  
    4949    SubCol( _build.partial.derivative.2.m(X,i,j),[[k]])
    5050  };
     51  //Evaluates the partial integration of k-th basic function for an 
     52  //array of points given as the rows of a matrix
     53  VMatrix _build.partial.integrate.1.v(Real k, VMatrix X, Real i)
     54  {
     55  //WriteLn("TRACE @BaseC2::_build.partial.derivative.1.v");
     56    SubCol( _build.partial.integrate.1.m(X,i),[[k]])
     57  };
    5158
    5259  //Evaluates all basic functions, one in each returned column, for an
    … …  
    8289    }))
    8390  };
     91  //Evaluates the first partial integration of all basic functions, one in
     92  //each returned column, for an  array of points given as the rows of a
     93  //matrix
     94  VMatrix _build.partial.integrate.1.m(VMatrix X, Real i)
     95  {
     96  //WriteLn("TRACE @BaseC2::_build.partial.derivative.1.m");
     97    Group("ConcatColumns", For(1,_.K,VMatrix(Real k)
     98    {
     99      _build.partial.integrate.1.v(k, X, i)
     100    }))
     101  };
    84102  //Some bases are more efficient using cache
    85103  Real _build.cache(VMatrix X, Real order) { False };
    … …  
    110128    _build.partial.derivative.2.v(k, X, i, j)
    111129  };
     130  //Evaluates the first partial integration of k-th basic function for an 
     131  //array of points given as the rows of a matrix
     132  VMatrix partial.integrate.1.v(Real k, VMatrix X, Real i)
     133  {
     134  //WriteLn("TRACE @BaseC2::partial.derivative.1.v");
     135    _build.partial.integrate.1.v(k, X, i)
     136  };
    112137
    113138  //Evaluates all basic functions, one in each returned column, for an
    … …  
    135160  };
    136161
     162  //Evaluates the first partial integration of all basic functions, one in
     163  //each returned column, for an  array of points given as the rows of a
     164  //matrix
     165  VMatrix partial.integrate.1.m(VMatrix X, Real i)
     166  {
     167  //WriteLn("TRACE @BaseC2::partial.derivative.1.m");
     168    _build.partial.integrate.1.m(X, i)
     169  };
    137170  //Some bases are more efficient using cache
    138171  Real upgrade.cache(VMatrix X, Real order)
    139172  { _build.cache(X,order) }
    140 
    141 
    142173};
    143 
Note: See TracChangeset for help on using the changeset viewer.