Login  Register

Re: fd operators update

Posted by Ralph Schreyer on Apr 21, 2013; 11:28am
URL: http://quantlib.414.s1.nabble.com/fd-operators-update-tp14224p14225.html

Hi Peter,

yes, either you define QL_NO_UBLAS_SUPPORT or you implement toMatrixDecomp() as you described it. Providing toMatrixDecomp() has the advantage that it delivers the components for toMatrix() of FdmLinearOp and in this way you get a matrix representation of the P(I)DE as a SparseMatrix, such that you can e. g. directly invert it in order to solve it.

This was e.g. used by Klaus Spanderen in his GPU example

http://hpcquantlib.wordpress.com/2012/12/27/multi-dimensional-finite-difference-methods-on-a-gpu/

where the QuantLib fdm framework was brought on the GPU via the toMatrix() interface and the CUDA cuSPARSE library.

Furthermore, you can use the matrix representation to precondition the finite difference solution.


Best regards
Ralph

Am 20.04.2013 um 20:25 schrieb Peter Caspers:

Hi,

when updating to the current trunk I notice that my operators do not
compile any more due to an extended interface of FdmLinearOpComposite.
Seems I have to implement

virtual Disposable<std::vector<SparseMatrix> > toMatrixDecomp() const=0;

and looking at other operators I think I should return a vector of
SparseMatrix'es corresponding to

apply_direction(0,...)
apply_direction(1,...)
...
apply_direction(n,...)
apply_mixed(...)

, yes ? What is the improvement when using UBLAS ? Sorry in case I
overlooked any documentation on this.

thank you
Peter





------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev