What about using petsc4py or Matrix.set() instead of numpy? Then I think it will be much more useful.
I was incidentally looking to do something very similar and the documentation on manual and efficient matrix assembling is very ‘sparse'. For example it is difficult to understand how to use Matrix.set(…) and SparsityPattern settings. Thanks in any case for sharing the code. Corrado > On 02 Mar 2015, at 16:37, Miroslav Kuchta <[email protected]> wrote: > > >> On 02 Mar 2015, at 16:15, Garth N. Wells <[email protected]> wrote: >> >> On Mon, Mar 2, 2015 at 11:21 AM, Miroslav Kuchta <[email protected]> wrote: >>> Hi, >>> >>> I wrote a simple script which shows how FEniCS can be used to solve >>> integral equations. >>> At the moment FEniCS is combined with numpy to solve the problem, so I’d be >>> grateful for >>> pointers on how to solve the entire problem in FEniCS. Also, are there any >>> objections to >>> this becoming a demo at some point? Thanks. >>> >> >> uBLAS is slated to removed at some point, so it would be better if it >> didn't depend on uBLAS. >> > > Yes, I know that the days of uBLAS are numbered, so I will try to make it > work with Eigen. > >> My other concern is that it's maybe more a NumPy demo than a FEniCS >> demo - the use of FEniCS in the demo is (understandably) pretty >> limited. >> >> An option would be to paste it on the Q&A forum under a question 'How >> do I solve . . . ‘. > > I started looking into this because of some Q&A question but I believe that > if posted > there or under a question ‘How do I solve’, the number of users that might > benefit > from it would be much smaller than if it were a demo (or perhaps some FEniCS > recipe). I will make a pull request when the code is ready with Eigen and the > cpp > version and then I’ll let you decide. > > Miro > >> >> Garth >> >>> Best regards, Miro >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fenics-support mailing list >>> [email protected] >>> http://fenicsproject.org/mailman/listinfo/fenics-support >>> > > _______________________________________________ > fenics mailing list > [email protected] > http://fenicsproject.org/mailman/listinfo/fenics _______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
