Bug in constructor of MeshInfo::Vertex and general question on DoFType of vertices
Hi,
working on issue #42 (closed) I came across a bug in the MeshInfo::Vertex class. The following constructor
Vertex( const IDType & id, const Point3D & coordinates, const DoFType & dofType ) :
id_( id ), coordinates_( coordinates ), dofType_( dofType_ )
{}
ignores its dofType argument. Apparently it sets the private attribute doftype_ always to zero, which corresponds to Inner.
This is of course easy to fix. The reason this did not cause problems so far is that MeshInfo::fromGmshFile sets the dofType for each vertex to Inner anyhow. This raises my question, where is the dofType of a vertex then set in the code? We need to distinguish between interior nodes and DirichletBoundary nodes, do we not?
In general I'd suggest to implement an approach like in FEniCS. There you can query whether a point is part of the domain boundary. Based on that information the user then constructs one or more functions to define their bounday conditions. In the inline mesh generation it would be straightforward to flag primitives as being on_boundary or inner, while adding a flexible way to allow the caller to flag different parts of the boundary of a rectangle, a box, an annulus, ..., as having this or that boundary type would be tedious and IMHO probably not flexible enough. Especially in the light of systems of PDEs.
Opinions?
Cheers
Marcus