Skip to content

Commit

Permalink
Update VTK Reader in NWTC_IO.f90 to Support Both FIELD and VECTOR Data
Browse files Browse the repository at this point in the history
Small correction to the previous commit.
  • Loading branch information
jjonkman committed Sep 5, 2018
1 parent 254fc1a commit 483e902
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules-local/nwtc-library/src/NWTC_IO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7891,12 +7891,12 @@ SUBROUTINE ReadVTK_SP_info( FileName, descr, dims, origin, gridSpacing, vecLabel

! VECTOR or FIELD Label
Line = ""
CALL ReadStr( Un, FileName, Line, "VECTOR or FIELD", "VECTOR or FIELD label", ErrStat2, ErrMsg2 )
CALL ReadStr( Un, FileName, Line, "VECTORS or FIELD", "VECTORS or FIELD label", ErrStat2, ErrMsg2 )
CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )

Line = trim(Line)
CALL Conv2UC( Line )
IF ( ( INDEX(Line, "VECTOR" ) /= 1 ) .OR. ( INDEX(Line, "FIELD" ) /= 1 ) ) THEN
IF ( ( INDEX(Line, "VECTORS" ) /= 1 ) .AND. ( INDEX(Line, "FIELD" ) /= 1 ) ) THEN
CALL SetErrStat( ErrID_Fatal, 'Invalid vtk structured_points file: did not find VECTORS or FIELD label', ErrStat, ErrMsg, RoutineName )
ELSE
IF ( INDEX(Line, "FIELD" ) == 1 ) THEN ! Must be FIELD
Expand All @@ -7922,7 +7922,7 @@ SUBROUTINE ReadVTK_SP_info( FileName, descr, dims, origin, gridSpacing, vecLabel
CALL SetErrStat( ErrID_Fatal, 'Invalid vtk structured_points file: FIELD array does not match DIMENSIONS', ErrStat, ErrMsg, RoutineName )
END IF
END IF
ELSE ! Must be VECTOR
ELSE ! Must be VECTORS
sz = INDEX(Line, "FLOAT" )
IF ( sz == 0 ) THEN
CALL SetErrStat( ErrID_Fatal, 'Invalid VECTORS datatype. Must be set to float.', ErrStat, ErrMsg, RoutineName )
Expand Down

0 comments on commit 483e902

Please sign in to comment.