Interior facet integrals fail when exterior facets indexed using mesh domain data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When I mark my exterior facets directly (using subdomain.
The main.cpp below (compiled with a demo CMakeLists.txt) and the attached CourantNumber.ufl illustrate this behaviour. The field u should evaluate to 10 everywhere but since the interior facets are being ignored the minimum value is 0.0. The old behaviour can be regained using 1.0-beta and commenting in and out the highlighted lines.
main.cpp:
-------
#include <dolfin.h>
#include "CourantNumber.h"
using namespace dolfin;
class Side : public SubDomain
{
public:
Side(const double &side) : side_(side)
{
}
bool inside(const Array<double>& x, bool on_boundary) const
{
return (std::fabs(x[0] - side_) < DOLFIN_EPS && on_boundary);
}
private:
double side_;
};
int main()
{
UnitInterval mesh(10);
Side left(0.0);
Side right(1.0);
/* begin 1.0-beta2 (and dev) */
left.
right.
/* end 1.0-beta2 */
/* begin 1.0-beta */
// boost::shared_ptr< MeshFunction< dolfin::uint > > edgeids = mesh.data(
// (*edgeids)
// left.mark(*edgeids, 1);
// right.mark(
/* end 1.0-beta */
CourantNumber
CourantNumber
CourantNumber
Constant dt(1.0);
Constant v(-1.0);
L.dt = dt;
L.v = v;
Function u(V);
solve(a == L, u);
std::cout << "max = " << u.vector().max() << ", min = " << u.vector().min() << std::endl;
File file("courant.
file << u;
plot(u);
assert(
return 0;
}
-------
Changed in dolfin: | |
milestone: | none → 1.2.0 |
Changed in dolfin: | |
status: | Fix Committed → Fix Released |
Assemblers now only use domain data attached to forms.