Working on init for new physical surfaces
This commit is contained in:
parent
1b32dfdfd6
commit
a0d45503f7
6 changed files with 93 additions and 54 deletions
|
|
@ -24,42 +24,6 @@ submodule(moduleMesh) boundaryEM
|
|||
|
||||
end function boundaryEMName_to_Index
|
||||
|
||||
subroutine addNodes(self, nodes)
|
||||
implicit none
|
||||
|
||||
class(boundaryEMGeneric), intent(inout):: self
|
||||
integer, intent(in):: nodes(:)
|
||||
integer:: n, nn, nNodes
|
||||
logical:: inArray
|
||||
type(meshNodePointer):: nodeToAdd
|
||||
|
||||
|
||||
nNodes = size(nodes)
|
||||
! Collect all nodes that are not already in the boundary
|
||||
DO n = 1, nNodes
|
||||
nodeToAdd%obj => mesh%nodes(nodes(n))%obj
|
||||
inArray = .false.
|
||||
! I cannot use the procedure 'any' for this
|
||||
do nn = 1 , size(self%nodes)
|
||||
IF (self%nodes(nn) == nodeToAdd) THEN
|
||||
! Node already in array
|
||||
inArray = .true.
|
||||
exit
|
||||
|
||||
end if
|
||||
|
||||
end do
|
||||
|
||||
if (.not. inArray) then
|
||||
! If not, add element to array of nodes
|
||||
self%nodes = [self%nodes, nodeToAdd]
|
||||
|
||||
end if
|
||||
|
||||
end do
|
||||
|
||||
end subroutine addNodes
|
||||
|
||||
module subroutine initBoundaryEM(self, config, object, b)
|
||||
use json_module
|
||||
use moduleErrors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue