Starting changes

Planning the new way to do BC in the EM field solver.
Probably I have to change how things are read, but I don't think this is
going to affect the input file.
This commit is contained in:
Jorge Gonzalez 2024-07-12 19:21:00 +02:00
commit 49025a6965

View file

@ -1,12 +1,23 @@
!Module to solve the electromagnetic field !Module to solve the electromagnetic field
MODULE moduleEM MODULE moduleEM
USE moduleMesh
IMPLICIT NONE IMPLICIT NONE
! Array of pointers to nodes.
!TODO: This is probably better in moduleMesh as multiple modules could use this.
TYPE:: meshNodePointer
CLASS(meshNode), POINTER:: obj
CONTAINS
END TYPE meshNodePointer
! TODO: Make this a derived type. ! TODO: Make this a derived type.
TYPE:: boundaryEM TYPE:: boundaryEM
CHARACTER(:), ALLOCATABLE:: typeEM CHARACTER(:), ALLOCATABLE:: typeEM
INTEGER:: physicalSurface INTEGER:: physicalSurface
REAL(8):: potential REAL(8):: potential
TYPE(meshNodePointer), ALLOCATABLE:: nodes(:)
CONTAINS CONTAINS
PROCEDURE, PASS:: apply PROCEDURE, PASS:: apply
@ -42,6 +53,7 @@ MODULE moduleEM
mesh%K(nodes(n), :) = 0.D0 mesh%K(nodes(n), :) = 0.D0
mesh%K(nodes(n), nodes(n)) = 1.D0 mesh%K(nodes(n), nodes(n)) = 1.D0
! TODO: Change this to pointer
mesh%nodes(nodes(n))%obj%emData%type = self%typeEM mesh%nodes(nodes(n))%obj%emData%type = self%typeEM
mesh%nodes(nodes(n))%obj%emData%phi = self%potential mesh%nodes(nodes(n))%obj%emData%phi = self%potential