Ignore:
Timestamp:
10/04/10 00:01:17 (14 years ago)
Author:
Eric.Larour
Message:

New time stepping, using CFL criterion. Just set time_adapt=1, and set cfl_coefficient (usually 1/2),
and off we go computing new time steps at every iteration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/solutions/transient3d_core.cpp

    r5318 r6130  
    2020        double dt,yts;
    2121        bool control_analysis;
     22        bool   time_adapt=false;
    2223        int    solution_type;
    2324        int    output_frequency;
     
    3536        femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);
    3637        femmodel->parameters->FindParam(&output_frequency,OutputFrequencyEnum);
     38        femmodel->parameters->FindParam(&time_adapt,TimeAdaptEnum);
    3739
    3840        /*initialize: */
     
    4345
    4446                /*Increment*/
     47                if(time_adapt) TimeAdaptx(&dt,femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters);
    4548                step+=1;
    4649                time+=dt;
    4750
    48                 if(verbose)_printf_("%s%g%s%i%s%g\n","time [yr]: ",time,"    iteration number: ",step,"/",floor(finaltime/dt));
     51                _printf_("%s%g%s%i%s%g%s%g\n","time [yr]: ",time/yts,"    iteration number: ",step,"/",floor(finaltime/dt)," dt [yr]: ",dt/yts);
    4952
    5053                if(verbose)_printf_("computing temperatures:\n");
Note: See TracChangeset for help on using the changeset viewer.