mirror of
https://github.com/OPM/opm-upscaling.git
synced 2025-02-25 18:45:23 -06:00
added: sanity check specified isotropic materials
if we end up with too small/large poisson's ratio, bail with an error message rather than crashing with a segfault
This commit is contained in:
parent
9fb2bfebc4
commit
8d6213ea0c
@ -132,6 +132,14 @@ Material* Material::create(int ID, const std::string& file)
|
||||
} else if (str == "en") { // young's modulus and poisson's ratio
|
||||
E = p1;
|
||||
nu = p2;
|
||||
} else {
|
||||
std::cerr << "Could not parse rock file " << file << ", bailing" << std::endl
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (nu < 0 || nu > 0.5) {
|
||||
std::cerr << "Material in " << file << " is not isotropic (nu=" << nu << "), bailing" << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return new Isotropic(ID,E,nu,rho);
|
||||
|
Loading…
Reference in New Issue
Block a user