Skip to content

Commit

Permalink
Make CoilSolver less picky of the Component section.
Browse files Browse the repository at this point in the history
  • Loading branch information
raback committed Feb 25, 2025
1 parent 90b0827 commit 1aca66d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fem/src/modules/CoilSolver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ SUBROUTINE CoilSolver( Model,Solver,dt,TransientSimulation )
REAL(KIND=dp), ALLOCATABLE :: DesiredCoilCurrent(:), DesiredCurrentDensity(:),&
CoilHelicity(:),CoilNormals(:,:)
LOGICAL :: Found, CoilClosed, CoilAnisotropic, UseDistance, FixConductivity, &
FitCoil, SelectNodes, CalcCurr, UseUnityCond
FitCoil, SelectNodes, CalcCurr, UseUnityCond, ThisIsCoil
LOGICAL, ALLOCATABLE :: GotCurr(:), GotDens(:), NormalizeCoil(:), CoilBodies(:)
REAL(KIND=dp) :: CoilCenter(3), CoilNormal(3), CoilTangent1(3), CoilTangent2(3), &
MinCurr(3),MaxCurr(3),TmpCurr(3)
Expand Down Expand Up @@ -349,7 +349,11 @@ SUBROUTINE CoilSolver( Model,Solver,dt,TransientSimulation )
IF( i <= Model % NumberOfComponents ) THEN
CoilList => Model % Components(i) % Values

IF(.NOT. ListCheckPresent( CoilList,'Coil Type' ) ) CYCLE
! Currently we assume that we have an active coil if any keyword starting with
! "coil" is found. This used to be more stringent criteria requiring "coil type".
ThisIsCoil = ListCheckPrefix( CoilList,'Coil' )
IF(.NOT. ThisIsCoil) CYCLE

TargetBodies => ListGetIntegerArray( CoilList,'Master Bodies',Found )
IF( .NOT. Found ) TargetBodies => ListGetIntegerArray( CoilList,'Body',Found )
IF( .NOT. Found ) CALL Fatal(Caller,'Coil fitting requires > Master Bodies <')
Expand Down

0 comments on commit 1aca66d

Please sign in to comment.