diff --git a/examples/symba_energy_momentum/cb.in b/examples/symba_energy_momentum/cb.in index 467352e46..d4c7fe1f7 100644 --- a/examples/symba_energy_momentum/cb.in +++ b/examples/symba_energy_momentum/cb.in @@ -1,6 +1,7 @@ 0 -39.47841760435743 -0.4 0.4 0.4 !Ip -0.0 0.0 0.0 !rot !11.2093063 -38.75937204 82.25088158 ! rot (radian / year) +39.47841760435743 ! G*Mass +0.005 ! Radius 0.0 ! J2 -0.0 ! J4 \ No newline at end of file +0.0 ! J4 +0.4 0.4 0.4 !Ip +0.0 0.0 0.0 !rot !11.2093063 -38.75937204 82.25088158 ! rot (radian / year) \ No newline at end of file diff --git a/src/io/io.f90 b/src/io/io.f90 index 2a54cab12..612e16ec0 100644 --- a/src/io/io.f90 +++ b/src/io/io.f90 @@ -794,6 +794,13 @@ module subroutine io_read_body_in(self, param) end if self%Gmass(i) = real(val, kind=DP) self%mass(i) = real(val / param%GU, kind=DP) + class is (swiftest_tp) + read(iu, *, iostat=ierr, err=100) self%id(i) + end select + read(iu, *, iostat=ierr, err=100) self%xh(1, i), self%xh(2, i), self%xh(3, i) + read(iu, *, iostat=ierr, err=100) self%vh(1, i), self%vh(2, i), self%vh(3, i) + select type (self) + class is (swiftest_pl) if (param%lclose) read(iu, *, iostat=ierr, err=100) self%radius(i) if (param%lrotation) then read(iu, iostat=ierr, err=100) self%Ip(:, i) @@ -803,11 +810,7 @@ module subroutine io_read_body_in(self, param) read(iu, iostat=ierr, err=100) self%k2(i) read(iu, iostat=ierr, err=100) self%Q(i) end if - class is (swiftest_tp) - read(iu, *, iostat=ierr, err=100) self%id(i) end select - read(iu, *, iostat=ierr, err=100) self%xh(1, i), self%xh(2, i), self%xh(3, i) - read(iu, *, iostat=ierr, err=100) self%vh(1, i), self%vh(2, i), self%vh(3, i) self%status(i) = ACTIVE self%lmask(i) = .true. end do @@ -885,7 +888,6 @@ module subroutine io_read_cb_in(self, param) end subroutine io_read_cb_in - function io_read_encounter(t, name1, name2, mass1, mass2, radius1, radius2, & xh1, xh2, vh1, vh2, enc_out, out_type) result(ierr) !! author: David A. Minton