Skip to content

Commit

Permalink
update to beacb0d
Browse files Browse the repository at this point in the history
  • Loading branch information
mlietzow committed Nov 12, 2024
1 parent beacb0d commit be6990b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Dust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down

0 comments on commit be6990b

Please sign in to comment.