← Back to team overview

dolfin team mailing list archive

1D elements

 


Hi,

I'm having a few difficulties with 1D elements in DOLFIN, more specifically with
the assembly over exterior integrals and when applying boundary conditions.

In Assembler::assembleExteriorFacets(), a boundary mesh is being created. This
fails when the mesh consists of intervals. It does so in CellType where only
Interval, Triangle and Tetraheron are available.

I successfully implemented a special case in Assembler::assembleExteriorFacets()
if (mesh.topology().dim() == 1){//handle 1D}, but is this what we want and could
it be done more naturally?

The second problem (BCs) is due to how VertexIterator is defined.
Using the 'topological' (default) or 'geometrical' method the following simple
SubDomain will fail:

class DirichletBoundary : public SubDomain
{
  bool inside(const real* x, bool on_boundary) const
  {
    return std::abs(x[0]) < DOLFIN_EPS && on_boundary;
  }
};

When a facet with index 0 (this is the facet I want) is used to generate a
VertexIterator it will look at the connectivity and return the vertex with index
1 on a standard mesh. A VertexIterator generated from the facet with index 1
will iterate over vertices 0 and 2. This destroys the logic of the geometrical
check in the inside() function.

However, using the 'pointwise' method the above SubDomain works as expected.

Any thoughts on where these problems can be tackled most efficiently?

Kristian








Follow ups