← Back to team overview

dolfin team mailing list archive

Possible bug?

 

Recently I have had some trouble putting LinearForm pointers into an array and trying to work on them. Basically if I have more than one in the array I either get a segfault or numbers that don't match up to when I am doing things without the array. The code looks something like this:
---------------------------------------------------------------------------------------------------
include "Stokes12.h";
include "Stokes23.h";

MyFunction f;
MyBC bc;

BilinearForm* bforms[2]={new Stokes12::BilinearForm(), new Stokes23::BilinearForm()}; LinearForm* lforms[2]={new Stokes12::LinearForm(f), new Stokes23::LinearForm(f)};
for(int i=0; i<2; i++){
   ...
   UnitSquare mesh(8,8);
   Matrix A;
   Vector x, b;
   FEM::assemble(*(bforms[i]), *(lforms[i]), A, b, mesh, bc);
   ...
}
------------------------------------------------------------------------------------------------

So I have gotten around the problem by using python to just write the different files and running them, but I thought someone might want to know about the problem I was having.


--

====================
Andy Terrel
Computer Science Dept
University of Chicago
aterrel@xxxxxxxxxxxx
---------------------




Follow ups

References