Closed dalphin5 closed 8 months ago
@algorithm should be coded out, it's our username. Your comments and code keeps appearing against our login. Thanks.
I made the correction, sorry for the inconvenience.
Hi @dalphin5,
You shall use:
@UnsignedIntegerParameter "iterMax" 150;
Best, Thomas
P.S. Your residual being constant, the Newton will never converge :)
Thank you for your quick answer, I did not know that syntax ! Yes, the test was not made to converge.
Dear Thomas,
It seems that mtest fails at modifying the value of the iterMax parameter. Here is a reproducible example that fails for me.
I compile the following test.mfront file successfully with the command line: mfront --obuild --interface=generic test.mfront
@DSL ImplicitII; @Behaviour test; @UseQt false; @Algorithm NewtonRaphson_NumericalJacobian; @Epsilon 1.0e-8; @IterMax 200; @StateVariable StrainStensor eel; eel.setGlossaryName("ElasticStrain"); @InitLocalVariables{ std::cout<<"iterMax="<<iterMax<<std::endl; } @Integrator{ feel=StrainStensor(1.0); } @ComputeFinalStress{ sig=1.0e6*Stensor4::Id()*eel; } @TangentOperator{ Dt=1.0e6*Stensor4::Id(); }
Then, the following test.mtest file
@ModellingHypothesis "Tridimensional"; @Behaviour "src/libBehaviour.so" "test"; @ExternalStateVariable "Temperature" 20.0; @Parameter "epsilon" 1.0e-12; @Parameter "iterMax" 150; @ImposedStrain "EXX" {0:0.0, 1:1.0}; @Times{0, 1 in 1000};
fails on my laptop with the following error message:
mtest test.mtest
testParametersInitializer::set: no parameter named 'iterMax' terminate called after throwing an instance of 'std::runtime_error' what(): SingleStructureSchemeParser::SingleStructureScheme : error while parsing file 'test.mtest' at line '9'. ExternalLibraryManager::setParameter: call to the 'test_setParameter' function failed Aborted