Skip to content

Commit

Permalink
better asserts I think
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf committed Sep 19, 2024
1 parent fd05e86 commit 8e3f3f9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions amr-wind/utilities/sampling/DTUSpinnerSampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ void DTUSpinnerSampler::sampling_locations(SampleLocType& sample_locs) const
}
}

AMREX_ALWAYS_ASSERT(
sample_locs.locations().size() == m_beam_points * m_ntotal);
AMREX_ALWAYS_ASSERT(sample_locs.locations().size() == num_points());
}

#ifdef AMR_WIND_USE_OPENFAST
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/sampling/FreeSurfaceSampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ void FreeSurfaceSampler::sampling_locations(SampleLocType& sample_locs) const
++idx;
}
}
AMREX_ALWAYS_ASSERT(sample_locs.locations().size() == num_output_points());
AMREX_ALWAYS_ASSERT(sample_locs.locations().size() == num_points());
}

bool FreeSurfaceSampler::update_sampling_locations()
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/sampling/LineSampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void LineSampler::sampling_locations(SampleLocType& sample_locs) const
sample_locs.push_back(loc, i);
}

AMREX_ALWAYS_ASSERT(sample_locs.locations().size() == m_npts);
AMREX_ALWAYS_ASSERT(sample_locs.locations().size() == num_points());
}

#ifdef AMR_WIND_USE_NETCDF
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/sampling/PlaneSampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void PlaneSampler::sampling_locations(SampleLocType& sample_locs) const
}
}

AMREX_ALWAYS_ASSERT(sample_locs.locations().size() == m_npts);
AMREX_ALWAYS_ASSERT(sample_locs.locations().size() == num_points());
}

#ifdef AMR_WIND_USE_NETCDF
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/sampling/ProbeSampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void ProbeSampler::sampling_locations(SampleLocType& sample_locs) const
sample_locs.push_back(loc, i);
}
}
AMREX_ALWAYS_ASSERT(sample_locs.locations().size() == m_npts);
AMREX_ALWAYS_ASSERT(sample_locs.locations().size() == num_points());
}

#ifdef AMR_WIND_USE_NETCDF
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/sampling/VolumeSampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void VolumeSampler::sampling_locations(SampleLocType& sample_locs) const
}
}
}
AMREX_ALWAYS_ASSERT(sample_locs.locations().size() == m_npts);
AMREX_ALWAYS_ASSERT(sample_locs.locations().size() == num_points());
}

#ifdef AMR_WIND_USE_NETCDF
Expand Down

0 comments on commit 8e3f3f9

Please sign in to comment.