← Back to team overview

fenics team mailing list archive

Re: pde.solve() command parameters

 

Quoting Anders Logg <logg@xxxxxxxxx>:

> You seem to be using an old version of DOLFIN. Try the latest release
> (0.9.0) where LinearPDE has been replaced by VariationalProblem.

I guess this won't work either because he's solving for 4 Functions.
Only 1,2,3 is currently supported. Is it possible to design for an
arbitrary number of Functions? Otherwise the VariationalProblem files
could end up being very large.

Kristian
 
> -- 
> Anders
> 
> 
> On Mon, Jan 19, 2009 at 05:39:59PM -0600, Brandon Chabaud wrote:
> > Hi.
> > 
> > I am trying to use fenics to solve a 2D elasticity problem.  I have written
> and
> > compiled a .form file using ffc with no problem.  However, when I try to
> > compile the main.cpp file that I've written, I get this error message:
> > 
> > main.cpp: In function 'int main(int, char**)':
> > main.cpp:177: error: no matching function for call to
> > 'dolfin::LinearPDE::solve(dolfin::Function&, dolfin::Function&,
> > dolfin::Function&, dolfin::Function&)'
> > /home/grad/chabaud/local/include/dolfin/pde/LinearPDE.h:53: note:
> > candidates are: void dolfin::LinearPDE::solve(dolfin::Function&)
> > /home/grad/chabaud/local/include/dolfin/pde/LinearPDE.h:56: note: void
> > dolfin::LinearPDE::solve(dolfin::Function&, dolfin::Function&)
> > /home/grad/chabaud/local/include/dolfin/pde/LinearPDE.h:59: note: void
> > dolfin::LinearPDE::solve(dolfin::Function&, dolfin::Function&,
> > dolfin::Function&)
> > scons: *** [main.o] Error 1
> > scons: building terminated because of errors.
> > The offending line in my cpp file seems to be
> >  
> > pde.solve(sigma,u,p,epsilon);
> >  
> > The lines immediately above it are
> >  
> > // Set up PDE
> > SolidBilinearForm a(n);
> > SolidLinearForm L(f1,g,u_prev,eps_prev,u0,F,uD,n);
> > LinearPDE pde(a,L,mesh);
> >  
> > // Solve PDE
> > Function u;
> > Function epsilon;
> > Function sigma;
> > Function p;
> > 
> > The solutions u, epsilon, sigma, p to the problem are defined in my .form
> > file by
> > 
> > Element1 = VectorElement("Discontinuous Lagrange", "triangle", 0, 4)
> > 
> > Element2 = VectorElement("Discontinuous Lagrange", "triangle", 0, 4)
> > 
> > Element3 = VectorElement("Discontinuous Lagrange", "triangle", 0)
> > 
> > Element4 = FiniteElement("Discontinuous Lagrange", "triangle", 0)
> > 
> > combo = MixedElement([Element1, Element3, Element4, Element2])
> > 
> > (z, v, q, w) = TestFunctions(combo)
> > 
> > (sigma, u, p, epsilon) = TrialFunctions(combo)
> > 
> > Do anyone know how to fix this error? Thanks.
> > 
> 
> > _______________________________________________
> > FEniCS-dev mailing list
> > FEniCS-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/fenics-dev
> 
> 




Follow ups

References