Hi,

the easiest way is to overwrite the function shouldWriteOutput in your problem file. Have a look at tutorialproblem_coupled.hh:

    bool shouldWriteOutput() const
    {
        return
            this->timeManager().timeStepIndex() > 0 &&
            (this->timeManager().timeStepIndex() % 1 == 0);
    }

If you change the "% 1" to "% n", it will write every n-th time step. You can combine this with asking the TimeManager for the current time by this->timeManager().time(). With that, you should be able to achieve what you want.

Due to the adaptive time step selection, this does not ensure that output is written at explicitly given times like at exactly 100 years. In order to achieve that, you have to use so-called episodes. You can find an example in test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh, grep for all instances of "epsiode" there to see how it is done.

Kind regards
Bernd

On 04/08/2015 04:56 PM, Christoph Grüninger wrote:
Hi Jahnes,
please do not write emails to dumux-owners, only use the mailing list.

There is a parameter, that can be set to write only every n-th time
step, but I cannot find it in the parameter list
http://www.dumux.org/doxygen-stable/html-2.6/a01137.php

What's wrong with setoutputinterval(nth)?

If you really want define time interval, for example very 100th year,
you need to set episodes of that length. Actually, I don't know exactly
how that is done.

Bye
Christoph


Am 03.04.2015 um 21:31 schrieb Giannis Varvaris:
Dear Dumux users,

I am trying to get familiar with Dumux and I want to ask you if it is
possible to help me for solving a problem I have. In 2p2cni, I try to
simulate my problem for 10.000 years and for that reason I want to write
the results to output file not for every single step but depending on
the time (for the first 10 years every time step, for the next 100 years
every 20 time steps etc). I read the Dumux Handbook and for the
ex2tutorialproblem you have used the command setoutputinterval(nth). I
would like to ask you which is the appropriate command for that case for
the 2p2cni problem.

Thank you in advance

Jahnes


_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux


--
_______________________________________________________________

Bernd Flemisch                         phone: +49 711 685 69162
IWS, Universität Stuttgart             fax:   +49 711 685 60430
Pfaffenwaldring 61            email: [email protected]
D-70569 Stuttgart            url: www.hydrosys.uni-stuttgart.de
_______________________________________________________________

_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to