https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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.
 

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.

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}
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
const BoundaryID ANY_BOUNDARY_ID
Definition MooseTypes.C:21

Referenced by NodalNormalsPreprocessor::execute().

◆ registerMooseObject()

registerMooseObject ( "MooseApp"  ,
NodalNormalsPreprocessor   
)