Anne Voigt wrote:
> Hello,
>
> I try to create a ffc-form of this formular:
>
> \int_\gamma \phi * dot(\nable \psi, n) ds
>
> This is what I did:
>
> element = FiniteElement("Lagrange", "triangle", 1)
>
> v = BasisFunction(element)
> u = BasisFunction(element)
> n= FacetNormal("triangle")
>
> a = v*dot(grad(u),n)*ds
>
> Now my problem: the generated class for the BilinearForm in the header
> file says does it depend on some dolfin::Function ans this is what I don
> not understand?!
You need to pass the normal vector as a function. Take a look at the DG
demos.
Garth
Here you can see what I mean:
>
> // DOLFIN wrappers
>
> #include <dolfin/Form.h>
>
> class Integration_RandBilinearForm : public dolfin::Form
> {
> public:
>
> Integration_RandBilinearForm(dolfin::Function& w0) : dolfin::Form()
> {
> __coefficients.push_back(&w0);
> }
>
> /// Return UFC form
> virtual const ufc::form& form() const
> {
> return __form;
> }
>
> /// Return array of coefficients
> virtual const dolfin::Array<dolfin::Function*>& coefficients() const
> {
> return __coefficients;
> }
>
> private:
>
> // UFC form
> UFC_Integration_RandBilinearForm __form;
>
> /// Array of coefficients
> dolfin::Array<dolfin::Function*> __coefficients;
>
> };
>
> What is this function?
>
> Thanks for your support
> Anne
>
> _______________________________________________
> DOLFIN-dev mailing list
> [email protected]
> http://www.fenics.org/mailman/listinfo/dolfin-dev
_______________________________________________
DOLFIN-dev mailing list
[email protected]
http://www.fenics.org/mailman/listinfo/dolfin-dev