CFD-GO / TCLB

TCLB - Templated MPI+CUDA/CPU Lattice Boltzmann code
https://tclb.io
GNU General Public License v3.0
178 stars 70 forks source link

XML element for running specific actions #278

Closed TravisMitchell closed 4 years ago

TravisMitchell commented 4 years ago

For multiphase methods, and certain temperature cases it could be useful to have an XML option of running various actions. E.g. use case is in thermocapillary flow where I want to run initialise all fields, solve the temperature update equation until steady state and then intialise the full simulation.

I view it would look something like:

<Init/>
<TempUpdate Iterations="1000000">
<StopChangeL2norm="1e-4"/>
>
<Solve Iterations="10000">
<VTK Iterations="100"/>
/>
llaniewski commented 4 years ago

I propose:

<Init/>
<Container> <!-- This keeps the Stop callback only for the RunAction -->
   <Stop L2ChangeNormBelow="1e-4" Times="10"/> <!-- Use standard Stop with custom Global -->
   <RunAction name="TempUpdate" Iterations="1000000"/> <!-- RunAction with name of action as argument, to keep with xml standard more -->
</Container>
<VTK Iterations="100"/>
<Solve Iterations="10000"/>
llaniewski commented 4 years ago

@TravisMitchell is it working right?

TravisMitchell commented 4 years ago

has been working nicely for me :). @ggruszczynski this can also take out the need for using the smoothing Additionals option in the multiphase models

ggruszczynski commented 4 years ago

Good idea!

llaniewski commented 4 years ago

fixed by #280