I have to change the init of the edges to include the EM boundaries now
This commit is contained in:
parent
4c72e68246
commit
0379ea42c2
3 changed files with 32 additions and 11 deletions
|
|
@ -72,17 +72,25 @@ MODULE moduleMesh
|
|||
TYPE:: meshNodePointer
|
||||
CLASS(meshNode), POINTER:: obj
|
||||
CONTAINS
|
||||
procedure, pass:: meshNodePointer_equal
|
||||
generic:: operator(==) => meshNodePointer_equal
|
||||
procedure, pass:: meshNodePointer_equal_type_type
|
||||
procedure, pass:: meshNodePointer_equal_type_int
|
||||
generic:: operator(==) => meshNodePointer_equal_type_type, meshNodePointer_equal_type_int
|
||||
|
||||
END TYPE meshNodePointer
|
||||
|
||||
interface
|
||||
module function meshNodePointer_equal(self, other) result(isEqual)
|
||||
module function meshNodePointer_equal_type_type(self, other) result(isEqual)
|
||||
class(meshNodePointer), intent(in):: self, other
|
||||
logical:: isEqual
|
||||
|
||||
end function meshNodePointer_equal
|
||||
end function meshNodePointer_equal_type_type
|
||||
|
||||
module function meshNodePointer_equal_type_int(self, other) result(isEqual)
|
||||
class(meshNodePointer), intent(in):: self
|
||||
integer, intent(in):: other
|
||||
logical:: isEqual
|
||||
|
||||
end function meshNodePointer_equal_type_int
|
||||
|
||||
end interface
|
||||
|
||||
|
|
@ -839,7 +847,7 @@ MODULE moduleMesh
|
|||
|
||||
module subroutine addNodes(self, nodes)
|
||||
class(boundaryEMGeneric), intent(inout):: self
|
||||
type(meshNodePointer), intent(in):: nodes(:)
|
||||
integer, intent(in):: nodes(:)
|
||||
|
||||
end subroutine addNodes
|
||||
|
||||
|
|
|
|||
|
|
@ -4,18 +4,20 @@ submodule(moduleMesh) boundaryEM
|
|||
implicit none
|
||||
|
||||
class(boundaryEMGeneric), intent(inout):: self
|
||||
type(meshNodePointer), intent(in):: nodes(:)
|
||||
INTEGER:: n, nn, nNodes
|
||||
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) == nodes(n)) THEN
|
||||
IF (self%nodes(nn) == nodeToAdd) THEN
|
||||
! Node already in array
|
||||
inArray = .true.
|
||||
exit
|
||||
|
|
@ -26,7 +28,7 @@ submodule(moduleMesh) boundaryEM
|
|||
|
||||
if (.not. inArray) then
|
||||
! If not, add element to array of nodes
|
||||
self%nodes = [self%nodes, nodes(n)]
|
||||
self%nodes = [self%nodes, nodeToAdd]
|
||||
|
||||
end if
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ submodule(moduleMesh) elements
|
|||
|
||||
END SUBROUTINE resetOutput
|
||||
|
||||
module function meshNodePointer_equal(self, other) result(isEqual)
|
||||
function meshNodePointer_equal_type_type(self, other) result(isEqual)
|
||||
implicit none
|
||||
|
||||
class(meshNodePointer), intent(in):: self, other
|
||||
|
|
@ -26,7 +26,18 @@ submodule(moduleMesh) elements
|
|||
|
||||
isEqual = self%obj%n == other%obj%n
|
||||
|
||||
end function meshNodePointer_equal
|
||||
end function meshNodePointer_equal_type_type
|
||||
|
||||
function meshNodePointer_equal_type_int(self, other) result(isEqual)
|
||||
implicit none
|
||||
|
||||
class(meshNodePointer), intent(in):: self
|
||||
integer, intent(in):: other
|
||||
logical:: isEqual
|
||||
|
||||
isEqual = self%obj%n == other
|
||||
|
||||
end function meshNodePointer_equal_type_int
|
||||
|
||||
!Constructs the global K matrix
|
||||
PURE module SUBROUTINE constructGlobalK(self)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue