Login  Register

fd questions ctd...

Posted by Peter Caspers-2 on Apr 22, 2012; 5:27pm
URL: http://quantlib.414.s1.nabble.com/fd-questions-ctd-tp12480.html

Hi,

may I ask one more question please:

4. it seems there is only a Dirichlet boundary condition implemented in the multi dimensional context. I want a Neumann condition and I think I managed to implement a version, but the boundary conditions are hardcoded as FdmDirichletBoundary in many classes, even the typedef for the FdmBoundaryConditionSet is vector<shared_ptr<FdmDirichletBoundary>>. Am I missing something here? How else would I be supposed to add new boundary conditions?

As for 1. below I extended the concentrating mesher by a flag that allows the central point to be forced into the mesh (using a piecewise linear transformation of the generating uniform grid, see e.g. Iain Clarke, FX Option Pricing, ch. ...). To set up non uniform grids with more than one concentrating point I added the glued1dmesher. If you consider these contributions useful, please add them to the library.

2 and 3 have obvious workarounds (rewriting the pde as backward and doing the time steps manually one by one). Still the implementation of forward operators becomes less readable by this implicit (yet trivial) transformation and possibly it may be useful in general to have a non uniform time grid in the solvers, e.g. via a transformation [0,1] -> [0,1], u -> pow(u,alpha), alpha > 0 and a linear one [0,1] -> [0,T] (cf. same reference as above). If considered useful, I'd be happy to do these extensions to the FdmBackwardSolver class.

Regards
Peter

-------- Original-Nachricht --------
Betreff: [Quantlib-users] fd questions
Datum: Thu, 12 Apr 2012 13:37:25 +0200
Von: Peter Caspers [hidden email]
An: [hidden email]


Hi,

I just started to use the ql 1.1 / finitedifferences framework and have 
a couple of (probably very basic) questions:

1. Is there a way to specify a or even several mandatory point(s) in the 
meshers?
2. Can I use a non uniform time grid in the solver?
3. Is there a forward solver ?

Thank you
Peter




------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev

concentrating1dmesher.cpp (3K) Download Attachment
concentrating1dmesher.hpp (1K) Download Attachment
glued1dmesher.cpp (2K) Download Attachment
glued1dmesher.hpp (1K) Download Attachment