Hello,
i'm working on a user defined solver and i was wondering if there is a way to control the output interval inside my solver. I've looked at ResultOutputSolve and noticed a variable named OutputActive. But i don't understand what it does. If i'm wrong, is there another variable which can be changed to control the output behavior?
OutputActive
-
- Site Admin
- Posts: 4832
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: OutputActive
Hi
Well, there is a recently introduced keyword "Exec Condition". If it is positive you run the solver, if negative then not. You could thereby define a global variable in some other solver. The only application I did was for the FindOptimum solver where you now define a variable "Found Better" (1 if found, -1 if not) such that you can save the results by setting in the Solver section
You can also use
then the solver which be run at the instances define by Output Intervals.
-Peter
Well, there is a recently introduced keyword "Exec Condition". If it is positive you run the solver, if negative then not. You could thereby define a global variable in some other solver. The only application I did was for the FindOptimum solver where you now define a variable "Found Better" (1 if found, -1 if not) such that you can save the results by setting in the Solver section
Code: Select all
Exec Condition = Equals Found Better
Code: Select all
Exec Solver = after saving
-Peter
Re: OutputActive
Thank you! It works!
Re: OutputActive
Hello,
Is there also a way to reset the current timestep? For example if one timestep was solved, but maybe after it i would like to change some parameters and re-run this timestep. If this is impossible, would it be possible to increase the number of Timestep Intervals?
Is there also a way to reset the current timestep? For example if one timestep was solved, but maybe after it i would like to change some parameters and re-run this timestep. If this is impossible, would it be possible to increase the number of Timestep Intervals?
Re: OutputActive
Hi,
have a look at thia thread: viewtopic.php?f=3&t=2674#p8142. You will find code for an adaptive timestepping solver I wrote which resets to the previous time step if the current one did not converge.
HTH,
Matthias
have a look at thia thread: viewtopic.php?f=3&t=2674#p8142. You will find code for an adaptive timestepping solver I wrote which resets to the previous time step if the current one did not converge.
HTH,
Matthias
Re: OutputActive
I've looked at your code, but the problem is that when i define the number of timestep intervalls (for example 400), elmer increases the current timestep, even if there was no convergence, and stops the simulation after 400 timesteps.
Re: OutputActive
Hi,
have a look at the code again...
The solver takes care of that. Set the number timesteps to a large number, e.g. 10000, and set the duration in the solver section. The solver stops Elmer if the duration is reached.
HTH,
Matthias
have a look at the code again...
The solver takes care of that. Set the number timesteps to a large number, e.g. 10000, and set the duration in the solver section. The solver stops Elmer if the duration is reached.
HTH,
Matthias
Re: OutputActive
Ahhhhh now i understand it! This makes sense. Thank you.