Skip to content
Snippets Groups Projects
Commit e796e14a authored by Norihiro Watanabe's avatar Norihiro Watanabe Committed by GitHub
Browse files

Merge pull request #1427 from norihiro-w/fix-line-edge

make Line elements return an edge
parents f1fea438 32298700
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,9 @@ BoundaryElementsAlongPolyline::BoundaryElementsAlongPolyline(MeshLib::Mesh const
// check all edges of the elements near the polyline
for (auto ele_id : ele_ids_near_ply) {
auto* e = _mesh.getElement(ele_id);
// skip line elements
if (e->getDimension() == 1)
continue;
// skip internal elements
if (!e->isBoundaryElement())
continue;
......
......@@ -25,7 +25,7 @@ public:
static const unsigned n_faces = 0;
/// Constant: The number of edges
static const unsigned n_edges = 0;
static const unsigned n_edges = 1;
/// Returns the i-th face of the element.
static const Element* getFace(const Element* /*e*/, unsigned /*i*/) { return nullptr; }
......
......@@ -39,9 +39,6 @@ public:
/// Constant: The FEM type of the element
static const CellType cell_type = CellType::LINE2;
/// Constant: The number of edges
static const unsigned n_edges = 1;
/// Constant: The number of neighbors
static const unsigned n_neighbors = 2;
......@@ -49,7 +46,7 @@ public:
static const unsigned edge_nodes[1][2];
/// Edge rule
typedef NoEdgeReturn EdgeReturn;
typedef LinearEdgeReturn EdgeReturn;
/**
* Checks if a point is inside the element.
......
......@@ -30,6 +30,9 @@ public:
/// Constant: The FEM type of the element
static const CellType cell_type = CellType::LINE3;
/// Edge rule
typedef QuadraticEdgeReturn EdgeReturn;
}; /* class */
} /* namespace */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment