ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #01209
Re: form arguments
Quoting Alessio Quaglino <alessio@xxxxxx>:
> I've just clone the last ffc repository, while trying to compile the form:
>
> # Test form for updated elasticity
>
> name = "ElasticityUpdated"
> element1 = VectorElement("Discontinuous Lagrange", "tetrahedron", 0, 9)
> element2 = VectorElement("Lagrange", "tetrahedron", 1)
>
> nuv = Constant("tetrahedron") # viscosity coefficient
>
> v = TestFunction(element2)
> f = Function(element2)
> sigma = Function(element1)
> epsilon = Function(element1)
>
> def tomatrix(q):
> return [ [q[3 * i + j] for i in range(3)] for j in range(3) ]
>
> sigmam = tomatrix(sigma)
> epsilonm = tomatrix(epsilon)
>
> L = ( dot(f,v) - dot(sigmam, grad(v)) - nuv * dot(epsilonm, grad(v)) ) * dx
>
>
> it seems that the class ElasticityUpdatedLinearForm is created with
> something missing. In fact when compliling the solver class I get the
> error:
>
> ElasticityUpdatedSolver.cpp:52: error: no matching function for call to
> 'ElasticityUpdatedLinearForm::ElasticityUpdatedLinearForm(dolfin::Function&,
> dolfin::Function&, dolfin::Function&, dolfin::real&)'
> dolfin/ElasticityUpdated.h:20442: note: candidates are:
> ElasticityUpdatedLinearForm::ElasticityUpdatedLinearForm()
> dolfin/ElasticityUpdated.h:20438: note:
> ElasticityUpdatedLinearForm::ElasticityUpdatedLinearForm(const
> ElasticityUpdatedLinearForm&)
>
>
> from the line:
>
> Lv = new ElasticityUpdatedLinearForm(f, sigma1, epsilon1, nuv);
>
>
> As a test, I compiled Poisson.form in the demos and I obtained another
> arguments-free constructor for the linear form, which looks different from
> the header Poisson.h given in
> http://www.fenics.org/hg/dolfin?cs=1135af9cfb40
You need to compile with the flag -l dolfin e.g.
ffc -l dolfin ElasticityUpdated.form
this should produce code wrapped for DOLFIN, instead of pure UFC code.
Kristian
> Regards,
> Alessio Quaglino
>
> _______________________________________________
> FFC-dev mailing list
> FFC-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/ffc-dev
>
References