Skip to content

Commit

Permalink
fix tolerances for long routines
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholaswogan committed Apr 29, 2024
1 parent a6ffb1e commit e046962
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/equilibrate_cea.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2043,7 +2043,7 @@ subroutine ec_UPDATE_ABUNDS_LONG(self,N_atoms_use,N_reac,N_species,solution_vect
END DO
END IF
total_good = .TRUE.
IF (n*ABS(solution_vector(N_species+N_atoms_use+1))/SUM(n_spec) > 05.d-5) THEN
IF (n*ABS(solution_vector(N_species+N_atoms_use+1))/SUM(n_spec) > 0.5d-5) THEN
total_good = .FALSE.
END IF

Expand Down Expand Up @@ -2094,7 +2094,7 @@ subroutine ec_UPDATE_ABUNDS_LONG(self,N_atoms_use,N_reac,N_species,solution_vect
END DO
END DO

mval_mass_good = MAXVAL(b_0)*1d-2
mval_mass_good = MAXVAL(b_0)*self%mass_tol
DO i_atom = 1, N_atoms_use
IF ((abs(b_0(i_atom)-sum(a(1:N_species,i_atom)*n_spec(1:N_species))) > mval_mass_good) .AND. (b_0(i_atom) > 1d-6)) THEN
mass_good = .FALSE.
Expand All @@ -2107,16 +2107,16 @@ subroutine ec_UPDATE_ABUNDS_LONG(self,N_atoms_use,N_reac,N_species,solution_vect
END IF
END DO

IF ((.NOT. mass_good) .OR. (.NOT. pi_good)) THEN
mass_good = .TRUE.
pi_good = .TRUE.
DO i_reac = 1, self%N_reactants
IF (ABS(n_spec(i_reac)-n_spec_old(i_reac)) > 1d-10) THEN
mass_good = .FALSE.
pi_good = .FALSE.
END IF
END DO
END IF
! IF ((.NOT. mass_good) .OR. (.NOT. pi_good)) THEN
! mass_good = .TRUE.
! pi_good = .TRUE.
! DO i_reac = 1, self%N_reactants
! IF (ABS(n_spec(i_reac)-n_spec_old(i_reac)) > 1d-10) THEN
! mass_good = .FALSE.
! pi_good = .FALSE.
! END IF
! END DO
! END IF

!!!-------------------

Expand Down

0 comments on commit e046962

Please sign in to comment.