Commit 7a795003 authored by GILLES Sebastien's avatar GILLES Sebastien

#460 Main: when the input parameter file hasn't been created, the program must...

#460 Main: when the input parameter file hasn't been created, the program must exit earlier to avoid an undue assert.
parent 5171c29f
......@@ -59,7 +59,7 @@
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "--input_parameters /Users/sebastien/Codes/HappyHeart/Data/Lua/demo_input_hyperelasticity.lua"
argument = "--input_parameters /Users/sebastien/Codes/HappyHeart/Data/Lua/demo_input_hyperelasticity_dumb.lua"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
......
......@@ -66,7 +66,7 @@ namespace HappyHeart
*
* Not the case for instance if the input parameter file doesn't exist.
*/
bool IsOk() const;
bool IsOk() const noexcept;
private:
......
......@@ -103,7 +103,7 @@ namespace HappyHeart
template<class InputParameterListT>
bool InitHappyHeart<InputParameterListT>::IsOk() const
bool InitHappyHeart<InputParameterListT>::IsOk() const noexcept
{
return input_parameter_data_ != nullptr;
}
......
......@@ -26,16 +26,15 @@ int main(int argc, char ** argv)
{
InitHappyHeart<InputParameterList> happy_heart(argc, argv);
// Happens if the input file wasn't found.
if (!happy_heart.IsOk())
return -1;
const auto& input_parameter_data = happy_heart.GetInputParameterList();
const auto& mpi = happy_heart.GetMpi();
try
{
// Happens if the input file wasn't found.
if (!happy_heart.IsOk())
return -1;
ElasticityNS::ElasticityModel model(mpi, input_parameter_data);
model.Run(input_parameter_data);
......
......@@ -26,16 +26,15 @@ int main(int argc, char ** argv)
{
InitHappyHeart<InputParameterList> happy_heart(argc, argv);
// Happens if the input file wasn't found.
if (!happy_heart.IsOk())
return -1;
const auto& input_parameter_data = happy_heart.GetInputParameterList();
const auto& mpi = happy_heart.GetMpi();
try
{
// Happens if the input file wasn't found.
if (!happy_heart.IsOk())
return -1;
HeatNS::Model model(mpi, input_parameter_data);
model.Run(input_parameter_data);
......
......@@ -18,16 +18,15 @@ int main(int argc, char ** argv)
{
InitHappyHeart<InputParameterList> happy_heart(argc, argv);
// Happens if the input file wasn't found.
if (!happy_heart.IsOk())
return -1;
const auto& input_parameter_data = happy_heart.GetInputParameterList();
const auto& mpi = happy_heart.GetMpi();
try
{
// Happens if the input file wasn't found.
if (!happy_heart.IsOk())
return -1;
HyperelasticityNS
::HyperElasticityModel<CiarletGeymonat, HyperelasticityNS::TimeScheme::half_sum> model(mpi,
input_parameter_data);
......
......@@ -26,16 +26,16 @@ int main(int argc, char ** argv)
{
InitHappyHeart<InputParameterList> happy_heart(argc, argv);
// Happens if the input file wasn't found.
if (!happy_heart.IsOk())
return -1;
const auto& input_parameter_data = happy_heart.GetInputParameterList();
const auto& mpi = happy_heart.GetMpi();
try
{
// Happens if the input file wasn't found.
if (!happy_heart.IsOk())
return -1;
___VARIABLE_problemName:identifier___NS::Model model(mpi, input_parameter_data);
model.Run(input_parameter_data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment