Skip to content

Commit

Permalink
Initialize array after allocation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juha Ruokolainen committed Aug 6, 2024
1 parent b0eb620 commit b77508e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fem/src/SolverUtils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ SUBROUTINE InitializeToZero( A, ForceVector )
NT => CurrentModel % Solver % NormalTangential
NT % NormalTangentialNOFNodes = 0
NT % NormalTangentialName = TRIM(str)

CALL CheckNormalTangentialBoundary( CurrentModel, NT % NormalTangentialName, &
NT % NormalTangentialNOFNodes, NT % BoundaryReorder, &
NT % BoundaryNormals, NT % BoundaryTangent1, NT % BoundaryTangent2, dim )
Expand Down Expand Up @@ -756,12 +757,11 @@ SUBROUTINE UpdateGlobalEquations( StiffMatrix, LocalStiffMatrix, &
Rotate = ( NT % NormalTangentialNOFNodes > 0 )
END IF


IF ( Rotate ) THEN
NormalIndexes = 0

np = mGetElementDOFs(pIndexes,Element)
np = MIN(np,n)
np = MIN(np, n)
NormalIndexes(1:np) = NT % BoundaryReorder(pIndexes(1:np))

CALL RotateMatrix( LocalStiffMatrix, LocalForce, n, dim, NDOFs, &
Expand Down Expand Up @@ -846,7 +846,7 @@ SUBROUTINE UpdateGlobalEquationsVec( Gmtr, Lmtr, Gvec, Lvec, n, &
NT => CurrentModel % Solver % NormalTangential
Rotate = ( NT % NormalTangentialNOFNodes > 0 )
END IF

IF ( Rotate ) THEN
Ind = 0

Expand Down Expand Up @@ -17850,6 +17850,7 @@ SUBROUTINE MergeRhsAndSolutions()

IF(.NOT. ASSOCIATED(A % rhs)) THEN
ALLOCATE(A % rhs(A % NumberOfRows))
A % RHS = 0._dp
END IF

IF(ASSOCIATED(betaVar)) THEN
Expand Down

0 comments on commit b77508e

Please sign in to comment.