diff --git a/code/IO.f90 b/code/IO.f90 index fa5e6d96f..2d65e447c 100644 --- a/code/IO.f90 +++ b/code/IO.f90 @@ -589,7 +589,7 @@ function IO_hybridIA(Nast,ODFfileName) gotRange = .false. gotDelta = .false. IO_hybridIA = -1.0_pReal ! initialize return value for case of error - center = 0.0_pReal + center = -1.0_pReal headerLength = 0_pInt !-------------------------------------------------------------------------------------------------- @@ -637,22 +637,25 @@ function IO_hybridIA(Nast,ODFfileName) end select enddo deltas = deltas*INRAD - case ('voxelboundary') - if ((IO_lc(IO_stringValue(line,positions,2_pInt))) == 'origin') & - center = 0.5_pReal + case ('origin') + if (IO_lc(IO_stringValue(line,positions,2_pInt)) == 'voxelboundary' .or. & + IO_lc(IO_stringValue(line,positions,2_pInt)) == 'boundary') center = 0.5_pReal + if (IO_lc(IO_stringValue(line,positions,2_pInt)) == 'voxelcenter' .or. & + IO_lc(IO_stringValue(line,positions,2_pInt)) == 'center') center = 0.0_pReal end select enddo if (.not. gotRange) & - call IO_error(error_ID = 156_pInt, ext_msg='no range') + call IO_error(error_ID = 156_pInt, ext_msg='no range information found') if (.not. gotDelta) & - call IO_error(error_ID = 156_pInt, ext_msg='no delta') + call IO_error(error_ID = 156_pInt, ext_msg='no delta information found') + if (center < 0.0_pReal) & + call IO_error(error_ID = 156_pInt, ext_msg='no origin information found') if (any(limits<=0.0_pReal)) & call IO_error(error_ID = 156_pInt, ext_msg='invalid range') if (any(deltas<=0.0_pReal)) & call IO_error(error_ID = 156_pInt, ext_msg='invalid deltas') - steps = nint(limits/deltas,pInt) allocate(dV_V(steps(3),steps(2),steps(1)),source=0.0_pReal) diff --git a/code/config/example.linearODF b/code/config/example.linearODF index 06220a398..d5733df1e 100644 --- a/code/config/example.linearODF +++ b/code/config/example.linearODF @@ -1,7 +1,7 @@ 3 header range phi1 90 PHI 90 phi2 90 delta phi1 5 PHI 5 phi2 5 -voxelBoundary origin +origin voxelBoundary 0.905 0.4025 0.1925