@@ -3379,7 +3379,6 @@ FUNCTION LevelProjector( BMesh1, BMesh2, Repeating, AntiRepeating, &
33793379 ArcCoeff = 1.0_dp
33803380 END IF
33813381
3382-
33833382
33843383 ! We have a weak projector if it is requested
33853384 NitscheProjector = ListGetLogical( BC,' Nitsche Projector' , Found )
@@ -3454,7 +3453,6 @@ FUNCTION LevelProjector( BMesh1, BMesh2, Repeating, AntiRepeating, &
34543453 Projector % FORMAT = MATRIX_LIST
34553454
34563455 IF ( NitscheProjector ) THEN
3457-
34583456 Projector % ProjectorType = PROJECTOR_TYPE_NITSCHE
34593457 ELSE
34603458 Projector % ProjectorType = PROJECTOR_TYPE_GALERKIN
@@ -3769,9 +3767,11 @@ FUNCTION LevelProjector( BMesh1, BMesh2, Repeating, AntiRepeating, &
37693767 END IF
37703768
37713769 CALL Info(Caller,' Max number of rows in projector: ' // I2S(ProjectorRows),Level= 10 )
3772- ALLOCATE ( Projector % InvPerm(ProjectorRows) )
3773- Projector % InvPerm = 0
3774-
3770+ IF (.NOT. NitscheProjector ) THEN
3771+ ALLOCATE ( Projector % InvPerm(ProjectorRows) )
3772+ Projector % InvPerm = 0
3773+ END IF
3774+
37753775 ! If after strong projectors there are still something undone they must
37763776 ! be dealt with the weak projectors.
37773777 SomethingUndone = .FALSE.
@@ -3860,11 +3860,13 @@ FUNCTION LevelProjector( BMesh1, BMesh2, Repeating, AntiRepeating, &
38603860 IF ( CreateDual ) DEALLOCATE ( DualNodePerm )
38613861 IF ( DoEdges ) DEALLOCATE ( EdgePerm )
38623862
3863- m = COUNT ( Projector % InvPerm == 0 )
3864- IF ( m > 0 ) THEN
3865- CALL Warn(Caller,' Projector % InvPerm not set in for dofs: ' // I2S(m))
3863+ IF (ASSOCIATED (Projector % InvPerm) ) THEN
3864+ m = COUNT ( Projector % InvPerm == 0 )
3865+ IF ( m > 0 ) THEN
3866+ CALL Warn(Caller,' Projector % InvPerm not set in for dofs: ' // I2S(m))
3867+ END IF
38663868 END IF
3867-
3869+
38683870 CALL Info(Caller,' Projector created' ,Level= 10 )
38693871
38703872 CONTAINS
@@ -5480,8 +5482,7 @@ SUBROUTINE AddProjectorWeakGeneric()
54805482
54815483 IF ( SaveErr ) CLOSE (11 )
54825484
5483-
5484-
5485+
54855486 DEALLOCATE ( Nodes % x, Nodes % y, Nodes % z, &
54865487 NodesM % x, NodesM % y, NodesM % z, &
54875488 NodesT % x, NodesT % y, NodesT % z, &
0 commit comments