From 49025a6965869b7a19975b8cad73a989cc0d6028 Mon Sep 17 00:00:00 2001 From: JGonzalez Date: Fri, 12 Jul 2024 19:21:00 +0200 Subject: [PATCH] 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. --- src/modules/solver/electromagnetic/moduleEM.f90 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/modules/solver/electromagnetic/moduleEM.f90 b/src/modules/solver/electromagnetic/moduleEM.f90 index ce33570..a141eac 100644 --- a/src/modules/solver/electromagnetic/moduleEM.f90 +++ b/src/modules/solver/electromagnetic/moduleEM.f90 @@ -1,12 +1,23 @@ !Module to solve the electromagnetic field MODULE moduleEM + USE moduleMesh 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. TYPE:: boundaryEM CHARACTER(:), ALLOCATABLE:: typeEM INTEGER:: physicalSurface REAL(8):: potential + TYPE(meshNodePointer), ALLOCATABLE:: nodes(:) CONTAINS PROCEDURE, PASS:: apply @@ -42,6 +53,7 @@ MODULE moduleEM mesh%K(nodes(n), :) = 0.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%phi = self%potential