www.mooseframework.org
Functions
NodalNormalsPreprocessor.C File Reference

Go to the source code of this file.

Functions

 registerMooseObject ("MooseApp", NodalNormalsPreprocessor)
 
bool hasBoundary (const std::vector< BoundaryID > &boundary_ids1, const std::vector< BoundaryID > &boundary_ids2)
 Local function to check to see if any intersection occurs between two vectors. More...
 

Function Documentation

◆ hasBoundary()

bool hasBoundary ( const std::vector< BoundaryID > &  boundary_ids1,
const std::vector< BoundaryID > &  boundary_ids2 
)

Local function to check to see if any intersection occurs between two vectors.

Neither can be assumed to be sorted but both are generally very short (just 1 or 2 entries) so doing an explicit double loop is probably the easiest.

Definition at line 48 of file NodalNormalsPreprocessor.C.

Referenced by NodalNormalsPreprocessor::execute().

50 {
51  for (auto id1 : boundary_ids1)
52  {
53  if (id1 == Moose::ANY_BOUNDARY_ID)
54  return true;
55 
56  for (auto id2 : boundary_ids2)
57  if (id1 == id2 || id2 == Moose::ANY_BOUNDARY_ID)
58  return true;
59  }
60  return false;
61 }
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:23

◆ registerMooseObject()

registerMooseObject ( "MooseApp"  ,
NodalNormalsPreprocessor   
)