Hi, I want to calculate the fowllowing integral,
by assembleing the form
element = create_element("Lagrange", "interval", 1)
E = Coefficient(element)
energy = E * E * dx
and I creat the form as fowllows:
auto el = std::make_shared<Form<T>>(fem::create_form<T>(*form_Poisson_1D_Q1_el, {V}, {{"E", E_}}, {}, {}));
but it reports the error:
terminate called after throwing an instance of 'std::runtime_error'
what(): Wrong number of argument spaces for Form.
Aborted (core dumped)
Now I have two questions:
1 What is wrong in my code, how can I create the form?
2 .Can I compute the intergral by just using dolfinx::fem::assemble_scalar(*el)
, is there anything else to take care?
Thanks very much!