Skip to main content

IsBoundaryNode

Inheritence

This method is inherited from the AbstractMesh class.

IsBoundaryNode

The IsBoundaryNode method checks if a specific node is a boundary node in the mesh.

Interface

INTERFACE
MODULE FUNCTION isBoundaryNode(obj, globalNode, islocal) RESULT(ans)
CLASS(AbstractMesh_), INTENT(IN) :: obj
INTEGER(I4B), INTENT(IN) :: globalNode
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: islocal
LOGICAL(LGT) :: ans
END FUNCTION isBoundaryNode
END INTERFACE

Syntax

RESULT = mesh%IsBoundaryNode(globalNode, [islocal])

Parameters

ParameterTypeIntentDescription
objCLASS(AbstractMesh_)INThe mesh object
globalNodeINTEGER(I4B)INGlobal or local node number to check
islocalLOGICAL(LGT)IN (optional)If true, globalNode is treated as a local node number

Return Value

TypeDescription
LOGICAL(LGT)True if the node is a boundary node

Description

IsBoundaryNode determines whether a specified node is a boundary node in the mesh. Boundary nodes are nodes that lie on the boundary of the domain.

Implementation Details

The method:

  1. Converts the global node number to a local node number if necessary
  2. Gets the node type from the node data
  3. Returns true if the node type is not an internal node

Example Usage

TYPE(Mesh_) :: mesh
INTEGER(I4B) :: nodeNum
LOGICAL(LGT) :: isBoundary

! Initialize mesh, nodeNum...

! Check if a node is on the boundary
isBoundary = mesh%IsBoundaryNode(nodeNum)

IF (isBoundary) THEN
PRINT *, "Node", nodeNum, "is on the boundary"
ELSE
PRINT *, "Node", nodeNum, "is an internal node"
END IF