Hi!
I would like to split the boundary of my domain (unit square) into its four edges. In my ufl, I write:
P1 = FiniteElement("Lagrange",triangle,1)
s = Coefficient(P1)
eta = s*ds(1)
I define my boundary part as:
class LowerBoundary : public dolfin::SubDomain{
bool inside(const dolfin::Array<double>& x, bool on_boundary) const
{ return ((x[1] < -1 + DOLFIN_EPS) and on_boundary);}
};
In my c++ Code, I use:
std::shared_ptr<dolfin::Form> a;
a.reset(new my_ufl::Form_eta(mesh);
dolfin::FacetFunction<std::size_t> boundaries(v.function_space()->mesh(),0);
LowerBoundary lowerboundary;
lowerboundary.mark(boundaries,1);
a->set_coefficient("s",dolfin::reference_to_no_delete_pointer(v));
a->ds=boundaries;
When running the code, it breaks down without giving an error statement. If I replace ds(1) by ds in the ufl file, then the code runs correctly. What do I do wrong?
I would be very thankful for any help! Thanks in advance,
frieder