Skip to content

Commit 4232476

Browse files
committed
Implement the side vertex average normal for edge3
see #4257 refs idaholab/moose#31554
1 parent a83b712 commit 4232476

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

include/geom/edge_edge3.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ class Edge3 : public Edge
166166
*/
167167
virtual Real volume () const override;
168168

169+
virtual Point side_vertex_average_normal(const unsigned int s) const override final;
170+
169171
/**
170172
* \returns A bounding box (not necessarily the minimal bounding box)
171173
* containing the edge.

src/geom/edge_edge3.C

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,14 @@ Real Edge3::volume () const
265265
}
266266

267267

268+
Point
269+
Edge3::side_vertex_average_normal(const unsigned int s) const
270+
{
271+
libmesh_assert_less (s, 2);
272+
libmesh_assert_equal_to(this->mapping_type(), LAGRANGE_MAP);
273+
return (s == 0) ? (this->point(0) - this->point(2)).unit() : (this->point(1) - this->point(2)).unit();
274+
}
275+
268276

269277
BoundingBox Edge3::loose_bounding_box () const
270278
{

0 commit comments

Comments
 (0)