From 87649ee36da259959f58712e01c081d746ecc74a Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <dmitri.naumov@ufz.de> Date: Thu, 14 Sep 2023 14:24:06 +0200 Subject: [PATCH] [MatL/MFront] Add actual value to the error Small reformatting if string literals. --- MaterialLib/SolidModels/MFront/MFrontGeneric.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/MaterialLib/SolidModels/MFront/MFrontGeneric.h b/MaterialLib/SolidModels/MFront/MFrontGeneric.h index 10201f6c374..92f4ef6d264 100644 --- a/MaterialLib/SolidModels/MFront/MFrontGeneric.h +++ b/MaterialLib/SolidModels/MFront/MFrontGeneric.h @@ -222,8 +222,10 @@ public: // TODO allow reordering of gradients and thermodynamic forces? if (grads[i].name != Grad::name) { - OGS_FATAL("The behaviour's {}th driver must be {}.", i, - Grad::name); + OGS_FATAL( + "OGS expects the {}th gradient to be {} but MFront " + "provides {}.", + i, Grad::name, grads[i].name); } if (grads[i].type != Grad::type) @@ -264,16 +266,16 @@ public: if (tdfs[i].name != TDF::name) { OGS_FATAL( - "The behaviour's {}th thermodynamic force must be {}.", - i, TDF::name); + "OGS expects the {}th thermodynamic force to be {} but " + "MFront provides {}.", + i, TDF::name, tdfs[i].name); } if (tdfs[i].type != TDF::type) { OGS_FATAL( "The behaviour's {}th thermodynamic force ({}) must be " - "of " - "type {}.", + "of type {}.", i, tdfs[i].name, varTypeToString(TDF::type)); } @@ -282,8 +284,7 @@ public: { OGS_FATAL( "The behaviour's {}th thermodynamic force ({}) must " - "have " - "size {} instead of {}.", + "have size {} instead of {}.", i, tdfs[i].name, TDF::template size<DisplacementDim>(), mgis::behaviour::getVariableSize(tdfs[i], hyp)); } -- GitLab