Changeset 14103


Ignore:
Timestamp:
12/07/12 09:57:48 (12 years ago)
Author:
jschierm
Message:

FIX: Fix md.timestepping defaults.

Location:
issm/trunk-jpl/src/m/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/timestepping.m

    r13040 r14103  
    66classdef timestepping
    77        properties (SetAccess=public)
    8                 start_time      = 0;
    9                 final_time      = 0;
    10                 time_step       = 0;
     8                start_time      = 0.;
     9                final_time      = 0.;
     10                time_step       = 0.;
    1111                time_adapt      = 0;
    12                 cfl_coefficient = 0;
     12                cfl_coefficient = 0.;
    1313        end
    1414        methods
     
    2424
    2525                        %time between 2 time steps
    26                         obj.time_step=1/2;
     26                        obj.time_step=1./2.;
    2727
    2828                        %final time
    29                         obj.final_time=10*obj.time_step;
     29                        obj.final_time=10.*obj.time_step;
    3030
    3131                        %time adaptation?
    3232                        obj.time_adapt=0;
    33                         obj.cfl_coefficient=.5;
     33                        obj.cfl_coefficient=0.5;
    3434                end % }}}
    3535                function md = checkconsistency(obj,md,solution,analyses) % {{{
  • issm/trunk-jpl/src/m/classes/timestepping.py

    r13040 r14103  
    1616        def __init__(self):
    1717                # {{{ Properties
    18                 self.start_time      = 0
    19                 self.final_time      = 0
    20                 self.time_step       = 0
     18                self.start_time      = 0.
     19                self.final_time      = 0.
     20                self.time_step       = 0.
    2121                self.time_adapt      = 0
    22                 self.cfl_coefficient = 0
     22                self.cfl_coefficient = 0.
    2323               
    2424                #set defaults
     
    4141               
    4242                #time between 2 time steps
    43                 self.time_step=1/2
     43                self.time_step=1./2.
    4444
    4545                #final time
    46                 self.final_time=10*self.time_step
     46                self.final_time=10.*self.time_step
    4747
    4848                #time adaptation?
    4949                self.time_adapt=0
    50                 self.cfl_coefficient=.5
     50                self.cfl_coefficient=0.5
    5151
    5252                return self
Note: See TracChangeset for help on using the changeset viewer.