From be6990ba98b60d03024d015bc90f3a6410d0ea3a Mon Sep 17 00:00:00 2001 From: mlietzow Date: Tue, 12 Nov 2024 16:15:01 +0100 Subject: [PATCH] update to beacb0d1ddab3fb80ec47f577a94b664f9fd771f --- src/Dust.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Dust.cpp b/src/Dust.cpp index 8d5d19e..506d794 100644 --- a/src/Dust.cpp +++ b/src/Dust.cpp @@ -4538,10 +4538,6 @@ void CDustComponent::calcStochasticHeatingPropabilities(CGridBasic * grid, uint i_density, dlist & wl_list) { - // size of wl_list must equal WL_STEPS - if(wl_list.size() != WL_STEPS) - cout << "\nERROR: Size of the wavelength array does not match (stochastic heating)"; - // Get local min and max grain sizes double a_min = getSizeMin(grid, *cell); double a_max = getSizeMax(grid, *cell); @@ -4555,6 +4551,13 @@ void CDustComponent::calcStochasticHeatingPropabilities(CGridBasic * grid, return; } + // size of wl_list must equal WL_STEPS + if(wl_list.size() != WL_STEPS) + { + cout << "\nERROR: Size of the wavelength array does not match (stochastic heating)" << endl; + return; + } + for(uint a = 0; a < nr_of_dust_species; a++) { // Check if dust grains should have been stochastically heated