Skip to content

Commit

Permalink
remove unused code and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chongchonghe committed Oct 4, 2024
1 parent 5852af7 commit c9aaf3d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,16 @@ template <> struct ISM_Traits<MarshakProblem> {
};

template <>
AMREX_GPU_HOST_DEVICE auto RadSystem<MarshakProblem>::DefinePhotoelectricHeatingE1Derivative(amrex::Real const /*temperature*/, amrex::Real const num_density)
AMREX_GPU_HOST_DEVICE auto RadSystem<MarshakProblem>::DefinePhotoelectricHeatingE1Derivative(amrex::Real const /*temperature*/, amrex::Real const /*num_density*/)
-> amrex::Real
{
// Values in cgs units from Bate & Keto (2015), Eq. 26.
// const double epsilon = 0.05; // default efficiency factor for cold molecular clouds
// const double ref_J_ISR = 5.29e-14; // reference value for the ISR in erg cm^3
// const double coeff = 1.33e-24;
// return coeff * epsilon * num_density / ref_J_ISR; // s^-1

// constant rate for testing
return PE_rate;
}

Expand Down
9 changes: 0 additions & 9 deletions src/radiation/radiation_dust_system.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ template <typename problem_t>
AMREX_GPU_HOST_DEVICE auto RadSystem<problem_t>::DefinePhotoelectricHeatingE1Derivative(amrex::Real const /*temperature*/, amrex::Real const num_density)
-> amrex::Real
{
// const double epsilon = 0.05; // default efficiency factor for cold molecular clouds
// const double ref_J_ISR = 5.29e-14; // reference value for the ISR in erg cm^3
// const double coeff = 1.33e-24;
// return coeff * epsilon * num_density / ref_J_ISR; // s^-1
return 0.0;
}

Expand Down Expand Up @@ -45,9 +41,6 @@ AMREX_GPU_DEVICE auto RadSystem<problem_t>::ComputeJacobianForGasAndDust(
}
}

// const auto d_fourpiboverc_d_t = ComputeThermalRadiationTempDerivativeMultiGroup(T_d, radBoundaries_g_copy);
AMREX_ASSERT(!d_fourpiboverc_d_t.hasnan());

// compute Jacobian elements
// I assume (kappaPVec / kappaEVec) is constant here. This is usually a reasonable assumption. Note that this assumption
// only affects the convergence rate of the Newton-Raphson iteration and does not affect the converged solution at all.
Expand All @@ -57,7 +50,6 @@ AMREX_GPU_DEVICE auto RadSystem<problem_t>::ComputeJacobianForGasAndDust(
result.J00 = 1.0;
result.J0g.fillin(cscale);
const double d_Td_d_T = 3. / 2. - T_d / (2. * T_gas);
// const double coeff_n = dt * dustGasCoeff_local * num_den * num_den / cscale;
dEg_dT *= d_Td_d_T;
const double dTd_dRg = -1.0 / (coeff_n * std::sqrt(T_gas));
const auto rg = kappaPoverE * d_fourpiboverc_d_t * dTd_dRg;
Expand Down Expand Up @@ -167,7 +159,6 @@ AMREX_GPU_DEVICE auto RadSystem<problem_t>::ComputeJacobianForGasAndDustWithPE(
result.J0g[nGroups_ - 1] -= PE_heating_energy_derivative * d_Eg_d_Rg[nGroups_ - 1];
}
const double d_Td_d_T = 3. / 2. - T_d / (2. * T_gas);
// const double coeff_n = dt * dustGasCoeff_local * num_den * num_den / cscale;
const auto dEg_dT = kappaPoverE * d_fourpiboverc_d_t * d_Td_d_T;
const double dTd_dRg = -1.0 / (coeff_n * std::sqrt(T_gas));
const auto rg = kappaPoverE * d_fourpiboverc_d_t * dTd_dRg;
Expand Down
3 changes: 0 additions & 3 deletions src/radiation/source_terms_multi_group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ AMREX_GPU_DEVICE auto RadSystem<problem_t>::ComputeJacobianForGas(double /*T_d*/
}
}

// const auto d_fourpiboverc_d_t = ComputeThermalRadiationTempDerivativeMultiGroup(T_d, radBoundaries_g_copy);
AMREX_ASSERT(!d_fourpiboverc_d_t.hasnan());

// compute Jacobian elements
// I assume (kappaPVec / kappaEVec) is constant here. This is usually a reasonable assumption. Note that this assumption
// only affects the convergence rate of the Newton-Raphson iteration and does not affect the converged solution at all.
Expand Down

0 comments on commit c9aaf3d

Please sign in to comment.