Skip to content
Snippets Groups Projects
Commit dec7f522 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

[m.0] Check averaging materials big/dense particles (#1033) (Closes #1033)

Merging branch 'm.0'  into 'main'.

See merge request !2883
parents febf5cce 040efd42
No related branches found
No related tags found
1 merge request!2883Check averaging materials big/dense particles (#1033)
Pipeline #190038 passed
......@@ -135,7 +135,9 @@ Material MaterialUtil::averagedMaterial(const Material& base_mat, const Admixtur
{
double totalAdmixedFraction = 0;
for (const OneAdmixture& admix : admixtures) {
ASSERT(admix.fraction >= 0 && admix.fraction <= 1);
ASSERT(admix.fraction >= 0);
if (admix.fraction > 1)
throw std::runtime_error("Volume fraction of one admixture component is more than 1");
totalAdmixedFraction += admix.fraction;
}
if (totalAdmixedFraction > 1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment