# Dirichlet boundary condition does not work for "pointwise"

Bug #490987 reported by Murtazo Nazarov on 2009-12-01

This bug report was converted into a question: question #92522: Dirichlet boundary condition does not work for "pointwise".

This bug affects 1 person
Affects Status Importance Assigned to Milestone
High
Unassigned

### Bug Description

The Dirichlet boundary condition does not work if I chose the "pointwise" setting:

In Stokes demo I define my subdomain as:

class Corner : public SubDomain
{
public:
bool inside(const double* x, bool on_boundary) const
{
return on_boundary &&
(std::abs(x[0] - 1.0) < 0.1 + DOLFIN_EPS ) &&
(std::abs(x[1] - 1.0) < 0.1 + DOLFIN_EPS);
}
};

Then I apply for zero BC for pressure in this subdomain:
Corner cr;
Constant zero(2, 0.0);
DirichletBC bc(W1, zero, cr, "pointwise");
// DirichletBC bc(W1, zero, cr, "geometric");

However "geometric" and "topological" options it works.

/murtazo

 Andy R Terrel (andy-terrel) wrote on 2009-12-02: #1

I believe this comes from the fact that the pointwise call always sets on_boundary to be false:

http://bazaar.launchpad.net/~dolfin-core/dolfin/main/annotate/head%3A/dolfin/fem/DirichletBC.cpp#L653

Also this method for a pinpoint will constrain more of the pressure than you want, for better results do:

class Corner : public SubDomain
{
public:
bool inside(const double* x, bool on_boundary) const
{
return (std::abs(x[0] - 1.0) < DOLFIN_EPS ) &&
(std::abs(x[1] - 1.0) < DOLFIN_EPS);
}
};

Of course you have to apply this as pointwise because the geometric and topological searches only look at facets and this is only hitting one point.

-- Andy

 Changed in dolfin: status: New → Invalid
 Changed in dolfin: status: Invalid → Confirmed status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.
Subscribing...