Changeset 1251


Ignore:
Timestamp:
07/07/09 12:21:51 (15 years ago)
Author:
Mathieu Morlighem
Message:

minor (removed fprintf mainly)

Location:
issm/trunk/src/m/classes/public/display
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/display/displaybc.m

    r1249 r1251  
    99%      displaybc(md)
    1010
    11 fprintf('   Boundary conditions:\n');
     11disp(sprintf('   Boundary conditions:'));
    1212
    13 fprintf('\n      geography:\n');
    14 fprintf('         gridonboundary: (%i)\n',length(md.gridonboundary));
    15 fprintf('         elementoniceshelf: (%i)\n',length(md.elementoniceshelf));
    16 fprintf('         gridoniceshelf: (%i)\n',length(md.gridoniceshelf));
    17 fprintf('         elementonicesheet: (%i)\n',length(md.elementonicesheet));
    18 fprintf('         gridonicesheet: (%i)\n',length(md.gridonicesheet));
     13disp(sprintf('\n      geography:'));
     14disp(sprintf('         gridonboundary: (%i)',length(md.gridonboundary)));
     15disp(sprintf('         elementoniceshelf: (%i)',length(md.elementoniceshelf)));
     16disp(sprintf('         gridoniceshelf: (%i)',length(md.gridoniceshelf)));
     17disp(sprintf('         elementonicesheet: (%i)',length(md.elementonicesheet)));
     18disp(sprintf('         gridonicesheet: (%i)',length(md.gridonicesheet)));
    1919
    20 fprintf('\n      diagnostic:\n');
    21 fprintf('         gridondirichlet_diag: (%i)\n',length(md.gridondirichlet_diag));
    22 fprintf('         dirichletvalues_diag [m/a]: (%i,%i)\n',length(md.dirichletvalues_diag),2);
    23 fprintf('         segmentonneumann_diag: (%i)\n',length(md.segmentonneumann_diag));
    24 fprintf('         neumannvalues_diag [N]: (%i)\n',length(md.neumannvalues_diag));
     20disp(sprintf('\n      diagnostic:'));
     21disp(sprintf('         gridondirichlet_diag: (%i)',length(md.gridondirichlet_diag)));
     22disp(sprintf('         dirichletvalues_diag [m/a]: (%i,%i)',length(md.dirichletvalues_diag),2));
     23disp(sprintf('         segmentonneumann_diag: (%i)',length(md.segmentonneumann_diag)));
     24disp(sprintf('         neumannvalues_diag [N]: (%i)',length(md.neumannvalues_diag)));
    2525
    26 fprintf('\n      prognostic:\n');
    27 fprintf('         gridondirichlet_prog: (%i)\n',length(md.gridondirichlet_prog));
    28 fprintf('         dirichletvalues_prog [m/a]: (%i)\n',length(md.dirichletvalues_prog));
    29 fprintf('         segmentonneumann_prog (flux): (%i)\n',length(md.segmentonneumann_prog));
    30 fprintf('         neumannvalues_prog [N]: (%i)\n',length(md.neumannvalues_prog));
    31 fprintf('         segmentonneumann_prog2 (thickness gradient): (%i)\n',length(md.segmentonneumann_prog2));
    32 fprintf('         neumannvalues_prog2 [N]: (%i)\n',length(md.neumannvalues_prog2));
     26disp(sprintf('\n      prognostic:'));
     27disp(sprintf('         gridondirichlet_prog: (%i)',length(md.gridondirichlet_prog)));
     28disp(sprintf('         dirichletvalues_prog [m/a]: (%i)',length(md.dirichletvalues_prog)));
     29disp(sprintf('         segmentonneumann_prog (flux): (%i)',length(md.segmentonneumann_prog)));
     30disp(sprintf('         neumannvalues_prog [N]: (%i)',length(md.neumannvalues_prog)));
     31disp(sprintf('         segmentonneumann_prog2 (thickness gradient): (%i)',length(md.segmentonneumann_prog2)));
     32disp(sprintf('         neumannvalues_prog2 [N]: (%i)',length(md.neumannvalues_prog2)));
    3333
    34 fprintf('\n      thermal:\n');
    35 fprintf('         gridondirichlet_thermal: (%i)\n',length(md.gridondirichlet_thermal));
    36 fprintf('         dirichletvalues_thermal [K]: (%i)\n',length(md.dirichletvalues_thermal));
    37 fprintf('         melting [m/a]: (%i)\n',length(md.melting));
     34disp(sprintf('\n      thermal:'));
     35disp(sprintf('         gridondirichlet_thermal: (%i)',length(md.gridondirichlet_thermal)));
     36disp(sprintf('         dirichletvalues_thermal [K]: (%i)',length(md.dirichletvalues_thermal)));
     37disp(sprintf('         melting [m/a]: (%i)',length(md.melting)));
  • issm/trunk/src/m/classes/public/display/displaycontrol.m

    r1249 r1251  
    99%      displaycontrol(md)
    1010
    11 disp(sprintf('      ''%s''','control'));
    12 %control type
    13 control_string='';
    14 for i=1:length(md.control_type),
    15         parameter=md.control_type{i};
    16         %check this parameter is a field from model!
    17         if ~isfield(struct(md),parameter),
    18                 error('displaysolutionparameters error message: one of the control type parameters does not exist!');
    19         end
    20         control_string=[control_string parameter ' and '];
    21 end
    22 control_string=control_string(1:length(control_string)-5);
    23 disp(sprintf('         control_type: %s %s',control_string,'(parameter where inverse control is carried out; ex: ''drag'', or ''B'')'));
    24 disp(sprintf('         fit: (%i)      (''absolute: 0'', ''relative: 1'', or ''logarithmic: 2''. default is ''absolute: 0'', for each optimization steps)',length(md.fit)));
    25 disp(sprintf('         meanvel: %g      (velocity scaling factor when evaluating relative or logarithmic misfit)',md.meanvel));
    26 disp(sprintf('         epsvel: %g      ( for relative fit, avoids misfit becoming infinity, for logarithmic fit, threshold for velocity)',md.epsvel));
    27 disp(sprintf('         nsteps: %i      (number of optimization searches)',md.nsteps));
    28 disp(sprintf('         optscal: (%i %i)      (scaling factor on gradient direction during optimization, for each optimization step)',size(md.optscal,1),size(md.optscal,2)));
    29 disp(sprintf('         mincontrolconstraint: %g      (minimum contraint for the controlled parameters)',md.mincontrolconstraint));
    30 disp(sprintf('         maxcontrolconstraint: %g      (maximum contraint for the controlled parameters)',md.maxcontrolconstraint));
    31 disp(sprintf('         maxiter: (%i)      (maximum iterations during each optimization step)',length(md.maxiter)));
    32 disp(sprintf('         tolx: %f      (minimum tolerance which will stop one optimization search)',md.tolx));
    33 disp(sprintf('         plot: %i      (visualization of the results of each iteration yes -> 1 no -> 0. Default is 1)',md.plot));
     11disp(sprintf('   Control:\n'));
     12
     13disp(sprintf('      control_type: %s %s',md.control_type,'(parameter where inverse control is carried out; ex: ''drag'', or ''B'')'));
     14disp(sprintf('      fit: (%i)      (''absolute: 0'', ''relative: 1'', or ''logarithmic: 2''. default is ''absolute: 0'', for each optimization steps)',length(md.fit)));
     15disp(sprintf('      meanvel: %g      (velocity scaling factor when evaluating relative or logarithmic misfit)',md.meanvel));
     16disp(sprintf('      epsvel: %g      ( for relative fit, avoids misfit becoming infinity, for logarithmic fit, threshold for velocity)',md.epsvel));
     17disp(sprintf('      nsteps: %i      (number of optimization searches)',md.nsteps));
     18disp(sprintf('      optscal: (%i %i)      (scaling factor on gradient direction during optimization, for each optimization step)',size(md.optscal,1),size(md.optscal,2)));
     19disp(sprintf('      mincontrolconstraint: %g      (minimum contraint for the controlled parameters)',md.mincontrolconstraint));
     20disp(sprintf('      maxcontrolconstraint: %g      (maximum contraint for the controlled parameters)',md.maxcontrolconstraint));
     21disp(sprintf('      maxiter: (%i)      (maximum iterations during each optimization step)',length(md.maxiter)));
     22disp(sprintf('      tolx: %f      (minimum tolerance which will stop one optimization search)',md.tolx));
     23disp(sprintf('      plot: %i      (visualization of the results of each iteration yes -> 1 no -> 0. Default is 1)',md.plot));
  • issm/trunk/src/m/classes/public/display/displayexppar.m

    r1249 r1251  
    99%      displayoutline(md)
    1010
    11 fprintf('\n   Outlines:\n');
    12 if isnan(md.domainoutline), fprintf('      domainoutline: N/A\n'); else fprintf('      domainoutline: not displayed (can be accessed by typing md.domainoutline)\n');end
    13 if isnan(md.riftoutline), fprintf('      riftoutline: N/A\n'); else fprintf('      riftoutline: not displayed (can be accessed by typing md.riftoutline)\n');end
    14 if isnan(md.iceshelfoutline), fprintf('      iceshelfoutline: N/A\n'); else fprintf('      iceshelfoutline: not displayed (can be accessed by typing md.iceshelfoutline)\n');end
    15 if isnan(md.icesheetoutline), fprintf('      icesheetoutline: N/A\n'); else fprintf('      icesheetoutline: not displayed (can be accessed by typing md.icesheetoutline)\n');end
    16 fprintf('\n   Model files:\n');
    17 if isnan(md.parameterfile), fprintf('      parameterfile: N/A\n'); else fprintf('      parameterfile: not displayed (can be accessed by typing md.parameterfile)\n');end
     11disp(sprintf('\n   Outlines:'));
     12if isnan(md.domainoutline),
     13        disp(sprintf('      domainoutline: N/A'));
     14else
     15        disp(sprintf('      domainoutline: not displayed (can be accessed by typing md.domainoutline)'));
     16end
     17if isnan(md.riftoutline),
     18        disp(sprintf('      riftoutline: N/A'));
     19else
     20        disp(sprintf('      riftoutline: not displayed (can be accessed by typing md.riftoutline)'));
     21end
     22if isnan(md.iceshelfoutline),
     23        disp(sprintf('      iceshelfoutline: N/A'));
     24else
     25        disp(sprintf('      iceshelfoutline: not displayed (can be accessed by typing md.iceshelfoutline)'));
     26end
     27if isnan(md.icesheetoutline),
     28        disp(sprintf('      icesheetoutline: N/A'));
     29else
     30        disp(sprintf('      icesheetoutline: not displayed (can be accessed by typing md.icesheetoutline)'));
     31end
     32
     33disp(sprintf('\n   Model files:'));
     34if isnan(md.parameterfile),
     35        disp(sprintf('      parameterfile: N/A'));
     36else
     37        disp(sprintf('      parameterfile: not displayed (can be accessed by typing md.parameterfile)'));
     38end
  • issm/trunk/src/m/classes/public/display/displaymaterials.m

    r1249 r1251  
    99%      displaymaterials(md)
    1010
    11 fprintf('   Materials:\n');
    12 fprintf('      rho_ice: %g [kg/m^3]\n',md.rho_ice);
    13 fprintf('      rho_water: %g [kg/m^3]\n',md.rho_water);
    14 if isempty(md.B), fprintf('      B: N/A (flow law parameter)'); else fprintf('      B: (%i) (flow law parameter [Pa/s^(1/n)])\n',length(md.B)); end
    15 if isempty(md.n), fprintf('      n: N/A (flow law coefficient)'); else fprintf('      n: (%i) (flow law coefficient)\n',length(md.n)); end
    16 fprintf('      heatcapacity: %g [J/kg/K]\n',md.heatcapacity);
    17 fprintf('      thermalconductivity: %g [W/m/K]\n',md.thermalconductivity);
    18 fprintf('      meltingpoint: %g [K] (melting point of ice at 1atm in K)\n',md.meltingpoint);
    19 fprintf('      latentheat: %g [J/kg] (latent heat of fusion)\n',md.latentheat);
    20 fprintf('      beta: %g [K/Pa]\n',md.beta);
    21 fprintf('      mixed_layer_capacity: %g [W/kg/K]\n',md.mixed_layer_capacity);
    22 fprintf('      thermal_exchange_velocity: %g [m/s]\n',md.thermal_exchange_velocity);
     11disp(sprintf('   Materials:\n'));
     12
     13disp(sprintf('      rho_ice: %g [kg/m^3]',md.rho_ice));
     14disp(sprintf('      rho_water: %g [kg/m^3]',md.rho_water));
     15if isempty(md.B), disp(sprintf('      B: N/A (flow law parameter)')); else disp(sprintf('      B: (%i) (flow law parameter [Pa/s^(1/n)])',length(md.B))); end
     16if isempty(md.n), disp(sprintf('      n: N/A (flow law coefficient)')); else disp(sprintf('      n: (%i) (flow law coefficient)',length(md.n))); end
     17disp(sprintf('      heatcapacity: %g [J/kg/K]',md.heatcapacity));
     18disp(sprintf('      thermalconductivity: %g [W/m/K]',md.thermalconductivity));
     19disp(sprintf('      meltingpoint: %g [K] (melting point of ice at 1atm in K)',md.meltingpoint));
     20disp(sprintf('      latentheat: %g [J/kg] (latent heat of fusion)',md.latentheat));
     21disp(sprintf('      beta: %g [K/Pa]',md.beta));
     22disp(sprintf('      mixed_layer_capacity: %g [W/kg/K]',md.mixed_layer_capacity));
     23disp(sprintf('      thermal_exchange_velocity: %g [m/s]',md.thermal_exchange_velocity));
  • issm/trunk/src/m/classes/public/display/displaymesh.m

    r1249 r1251  
    99%      displaymesh(md)
    1010
    11 fprintf('   Mesh:\n');
     11disp(sprintf('   Mesh:'));
    1212
    1313if strcmpi(md.type,'3d'),
    1414
    15         fprintf('\n      Elements and nodes of the original 2d mesh:\n');
    16         fprintf('         numberofelements2d: %i (number of elements)\n',md.numberofelements2d);
    17         fprintf('         numberofgrids2d: %i (number of nodes)\n',md.numberofgrids2d);
    18         fprintf('         elements2d: (%i-%i) (index into (x,y,z), coordinates of the grids)\n',md.numberofelements2d,size(md.elements2d,2));
    19         fprintf('         elements_type2d: (%i) (element types, according to number of grids)\n',md.numberofelements2d);
    20         fprintf('         x2d: (%i) (node x coordinates)\n',length(md.x2d));
    21         fprintf('         y2d: (%i) (node y coordinates)\n',length(md.y2d));
    22         fprintf('         z2d: (%i) (node z coordinates)\n',length(md.z2d));
     15        disp(sprintf('\n      Elements and nodes of the original 2d mesh:'));
     16        disp(sprintf('         numberofelements2d: %i (number of elements)',md.numberofelements2d));
     17        disp(sprintf('         numberofgrids2d: %i (number of nodes)',md.numberofgrids2d));
     18        disp(sprintf('         elements2d: (%i-%i) (index into (x,y,z), coordinates of the grids)',md.numberofelements2d,size(md.elements2d,2)));
     19        disp(sprintf('         elements_type2d: (%i) (element types, according to number of grids)',md.numberofelements2d));
     20        disp(sprintf('         x2d: (%i) (node x coordinates)',length(md.x2d)));
     21        disp(sprintf('         y2d: (%i) (node y coordinates)',length(md.y2d)));
     22        disp(sprintf('         z2d: (%i) (node z coordinates)',length(md.z2d)));
    2323
    24         fprintf('\n      Elements and nodes of the extruded 3d mesh:\n');
     24        disp(sprintf('\n      Elements and nodes of the extruded 3d mesh:'));
    2525else
    2626
    27         fprintf('\n      Elements and nodes:\n');
     27        disp(sprintf('\n      Elements and nodes:'));
    2828end
    2929
    30 fprintf('         numberofelements: %i (number of elements)\n',md.numberofelements);
    31 fprintf('         numberofgrids: %i (number of nodes)\n',md.numberofgrids);
    32 if ~isnan(md.dof), fprintf('      dof: %i (maximum number of dofs solved)\n',md.dof); end
    33 fprintf('         elements: (%i-%i) (index into (x,y,z), coordinates of the grids)\n',md.numberofelements,size(md.elements,2));
    34 fprintf('         elements_type: (%i) (element types, according to number of grids)\n',md.numberofelements);
    35 fprintf('         x: (%i) (node x coordinates)\n',length(md.x));
    36 fprintf('         y: (%i) (node y coordinates)\n',length(md.y));
    37 fprintf('         z: (%i) (node z coordinates)\n',length(md.z));
    38 fprintf('         numlayers: %i (number of extrusion layers)\n',md.numlayers);
     30disp(sprintf('         numberofelements: %i (number of elements)',md.numberofelements));
     31disp(sprintf('         numberofgrids: %i (number of nodes)',md.numberofgrids));
     32if ~isnan(md.dof), disp(sprintf('      dof: %i (maximum number of dofs solved)',md.dof)); end
     33disp(sprintf('         elements: (%i-%i) (index into (x,y,z), coordinates of the grids)',md.numberofelements,size(md.elements,2)));
     34disp(sprintf('         elements_type: (%i) (element types, according to number of grids)',md.numberofelements));
     35disp(sprintf('         x: (%i) (node x coordinates)',length(md.x)));
     36disp(sprintf('         y: (%i) (node y coordinates)',length(md.y)));
     37disp(sprintf('         z: (%i) (node z coordinates)',length(md.z)));
     38disp(sprintf('         numlayers: %i (number of extrusion layers)',md.numlayers));
    3939
    40 fprintf('\n      Properties:\n');
    41 fprintf('         type: %s\n',md.type);
    42 fprintf('         Penalties: (%i-%i))\n',size(md.penalties,1),size(md.penalties,2));
    43 fprintf('         gridonbed: (%i) (lower nodes flags list)\n',length(md.gridonbed));
    44 fprintf('         gridonsurface: (%i) (upper nodes flags list)\n',length(md.gridonsurface));
    45 fprintf('         elementonbed: (%i) (lower elements flags list)\n',length(md.elementonbed));
    46 fprintf('         elementonsurface: (%i) (upper elements flags list)\n',length(md.elementonsurface));
     40disp(sprintf('\n      Properties:'));
     41disp(sprintf('         type: %s',md.type));
     42disp(sprintf('         Penalties: (%i-%i))',size(md.penalties,1),size(md.penalties,2)));
     43disp(sprintf('         gridonbed: (%i) (lower nodes flags list)',length(md.gridonbed)));
     44disp(sprintf('         gridonsurface: (%i) (upper nodes flags list)',length(md.gridonsurface)));
     45disp(sprintf('         elementonbed: (%i) (lower elements flags list)',length(md.elementonbed)));
     46disp(sprintf('         elementonsurface: (%i) (upper elements flags list)',length(md.elementonsurface)));
  • issm/trunk/src/m/classes/public/display/displayobservations.m

    r1249 r1251  
    99%      displayobservations(md)
    1010
    11 fprintf('   Observations:\n');
    12 fprintf('      vx_obs [m/a]: (%i)\n',length(md.vx_obs));
    13 fprintf('      vy_obs [m/a]: (%i)\n',length(md.vy_obs));
    14 fprintf('      vel_obs [m/a]: (%i)\n',length(md.vel_obs));
    15 fprintf('      accumulation [m/a]: (%i)\n',length(md.accumulation));
    16 fprintf('      observed_temperature [K]: (%i)\n',length(md.observed_temperature));
    17 fprintf('      geothermalflux [W/m^2]: (%i)\n',length(md.geothermalflux));
     11disp(sprintf('   Observations:\n'));
     12
     13disp(sprintf('      vx_obs [m/a]: (%i)',length(md.vx_obs)));
     14disp(sprintf('      vy_obs [m/a]: (%i)',length(md.vy_obs)));
     15disp(sprintf('      vel_obs [m/a]: (%i)',length(md.vel_obs)));
     16disp(sprintf('      accumulation [m/a]: (%i)',length(md.accumulation)));
     17disp(sprintf('      observed_temperature [K]: (%i)',length(md.observed_temperature)));
     18disp(sprintf('      geothermalflux [W/m^2]: (%i)',length(md.geothermalflux)));
  • issm/trunk/src/m/classes/public/display/displayparallel.m

    r1249 r1251  
    99%      displayparallel(md)
    1010
    11 fprintf('\n      parallelisation:\n');
    12 fprintf('         cluster: %s      (set to ''cluster_name'' to run in cluster, ''none'' to run serially)\n',md.cluster);
    13 fprintf('         np: %i      (number of CPUS requested on cluster)\n',md.np);
    14 fprintf('         exclusive: %i      (set to 1 if CPUS used are not to be shared with other users, 0 otherwise)\n',md.exclusive);
    15 fprintf('         time: %i      (amount of time requested on cluster)\n',md.time);
    16 fprintf('         alloc_cleanup: %i      (allocation cleanup before starting a job, default 1)\n',md.alloc_cleanup);
    17 fprintf('         waitonlock: %i      (wait for batch results 1, or return 0. default is to return )\n',md.waitonlock);
    18 fprintf('         queue: %s      (special queue name on cluster? default is '''')\n',md.queue);fprintf('\n      solver options:\n');
     11disp(sprintf('   parallel computation parameters:'));
    1912
    20 fprintf('\n      solver options:\n');
    21 fprintf('         ice\n');
    22 fprintf('            solver_type: %s  (solver type for Ice: ''lu'' or ''cholesky'')\n',md.solver_type);
    23 fprintf('         cielo\n');
    24 fprintf('            solverstring: %s \n            (solver string for Petsc. See solversetto... routines. Default is asm)\n',md.solverstring);
     13disp(sprintf('\n      parallelisation:'));
     14disp(sprintf('         cluster: %s      (set to ''cluster_name'' to run in cluster, ''none'' to run serially)',md.cluster));
     15disp(sprintf('         np: %i      (number of CPUS requested on cluster)',md.np));
     16disp(sprintf('         exclusive: %i      (set to 1 if CPUS used are not to be shared with other users, 0 otherwise)',md.exclusive));
     17disp(sprintf('         time: %i      (amount of time requested on cluster)',md.time));
     18disp(sprintf('         alloc_cleanup: %i      (allocation cleanup before starting a job, default 1)',md.alloc_cleanup));
     19disp(sprintf('         waitonlock: %i      (wait for batch results 1, or return 0. default is to return )',md.waitonlock));
     20disp(sprintf('         queue: %s      (special queue name on cluster? default is '''')',md.queue));disp(sprintf('\n      solver options:'));
     21
     22disp(sprintf('\n      solver options:'));
     23disp(sprintf('         ice'));
     24disp(sprintf('            solver_type: %s  (solver type for Ice: ''general'', ''lu'' or ''cholesky'')',md.solver_type));
     25disp(sprintf('         cielo'));
     26disp(sprintf('            solverstring: %s \n            (solver string for Petsc. See solversetto... routines. Default is asm)',md.solverstring));
  • issm/trunk/src/m/classes/public/display/displayparameters.m

    r1249 r1251  
    99%      displayparameters(md)
    1010
    11 fprintf('   Parameters:\n');
     11disp(sprintf('   Parameters:'));
    1212
    13 fprintf('\n      geometry:\n');
    14 if isempty(md.surface), fprintf('         surface: N/A'); else fprintf('         surface [m]: (%i)\n',length(md.surface)); end
    15 if isempty(md.thickness), fprintf('         thickness: N/A'); else fprintf('         thickness [m]: (%i)\n',length(md.thickness)); end
    16 if isempty(md.bed), fprintf('         bed: N/A'); else fprintf('         bed [m]: (%i)\n',length(md.bed)); end
    17 if isempty(md.firn_layer), fprintf('         firn_layer: N/A'); else fprintf('         firn_layer [m]: (%i)\n',length(md.firn_layer)); end
    18 if strcmpi(md.type,'3d'), fprintf('         elementonbed: (%i)\n',length(md.elementonbed)); end
    19 if strcmpi(md.type,'3d'), fprintf('         elementonsurface: (%i)\n',length(md.elementonsurface)); end
    20 if strcmpi(md.type,'3d'), fprintf('         gridonbed: (%i)\n',length(md.gridonbed)); end
    21 if strcmpi(md.type,'3d'), fprintf('         gridonsurface: (%i)\n',length(md.gridonsurface)); end
     13disp(sprintf('\n      geometry:'));
     14if isempty(md.surface), disp(sprintf('         surface: N/A')); else disp(sprintf('         surface [m]: (%i)',length(md.surface))); end
     15if isempty(md.thickness), disp(sprintf('         thickness: N/A')); else disp(sprintf('         thickness [m]: (%i)',length(md.thickness))); end
     16if isempty(md.bed), disp(sprintf('         bed: N/A')); else disp(sprintf('         bed [m]: (%i)',length(md.bed))); end
     17if isempty(md.firn_layer), disp(sprintf('         firn_layer: N/A')); else disp(sprintf('         firn_layer [m]: (%i)',length(md.firn_layer))); end
     18if strcmpi(md.type,'3d'), disp(sprintf('         elementonbed: (%i)',length(md.elementonbed))); end
     19if strcmpi(md.type,'3d'), disp(sprintf('         elementonsurface: (%i)',length(md.elementonsurface))); end
     20if strcmpi(md.type,'3d'), disp(sprintf('         gridonbed: (%i)',length(md.gridonbed))); end
     21if strcmpi(md.type,'3d'), disp(sprintf('         gridonsurface: (%i)',length(md.gridonsurface))); end
    2222
    23 fprintf('\n      physical parameters:\n');
    24 fprintf('         g: %g [m/s^2]\n',md.g);
     23disp(sprintf('\n      physical parameters:'));
     24disp(sprintf('         g: %g [m/s^2]',md.g));
    2525
    26 fprintf('\n      Friction parameters (Sigma= drag^2 * Neff ^r * u ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p)\n');
    27 fprintf('         drag_type: %i (0: none, 1:plastic, 2:viscous):\n',md.drag_type);
    28 if isempty(md.drag), fprintf('         drag: N/A'); else fprintf('         drag: (%i)\n',length(md.drag)); end
    29 fprintf('         drag_type: %i (0: none, 1:plastic, 2:viscous):\n',md.drag_type);
    30 if isempty(md.p), fprintf('         p: N/A'); else fprintf('         p: (%i)\n',length(md.p)); end
    31 if isempty(md.q), fprintf('         q: N/A'); else fprintf('         q: (%i)\n',length(md.q)); end
     26disp(sprintf('\n      Friction parameters (Sigma= drag^2 * Neff ^r * u ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p)'));
     27disp(sprintf('         drag_type: %i (0: none, 1:plastic, 2:viscous):',md.drag_type));
     28if isempty(md.drag), disp(sprintf('         drag: N/A')); else disp(sprintf('         drag: (%i)',length(md.drag))); end
     29disp(sprintf('         drag_type: %i (0: none, 1:plastic, 2:viscous):',md.drag_type));
     30if isempty(md.p), disp(sprintf('         p: N/A')); else disp(sprintf('         p: (%i)',length(md.p))); end
     31if isempty(md.q), disp(sprintf('         q: N/A')); else disp(sprintf('         q: (%i)',length(md.q))); end
  • issm/trunk/src/m/classes/public/display/displayresults.m

    r1249 r1251  
    99%      displayresults(md)
    1010
    11 fprintf('   Results:\n');
     11disp(sprintf('   Results:'));
    1212
    1313%call struct_display recursively on md.results
     
    1515
    1616%display output parameters
    17 fprintf('\n      output parameters:\n');
    18 if ~isstruct(md.stress), fprintf('         stress: N/A\n');
     17disp(sprintf('\n      output parameters:'));
     18if ~isstruct(md.stress), disp(sprintf('         stress: N/A'));
    1919else
    20         fprintf('         stress [Pa]:');
     20        disp(sprintf('         stress [Pa]:'));
    2121        struct_display(md.stress,'         ');
    2222end
    23 if ~isstruct(md.deviatoricstress), fprintf('         deviatoricstress: N/A\n');
     23if ~isstruct(md.deviatoricstress), disp(sprintf('         deviatoricstress: N/A'));
    2424else
    25         fprintf('         deviatoricstress [Pa]:');
     25        disp(sprintf('         deviatoricstress [Pa]:'));
    2626        struct_display(md.deviatoricstress,'         ');
    2727end
    28 if ~isstruct(md.strainrate), fprintf('         strainrate: N/A\n');
     28if ~isstruct(md.strainrate), disp(sprintf('         strainrate: N/A'));
    2929else
    30            fprintf('         strainrate [1/a]:');
    31                   struct_display(md.strainrate,'         ');
     30        disp(sprintf('         strainrate [1/a]:'));
     31        struct_display(md.strainrate,'         ');
    3232end
    3333end
     
    3939                field=eval(['structure.' structure_fields{i}]);
    4040                if isstruct(field),
    41                         fprintf('\n%s\n',[offset structure_fields{i} ':']);
     41                        disp(sprintf('\n%s',[offset structure_fields{i} ':']));
    4242                        struct_display(field,[offset '   ']);
    4343                else
    44                         fprintf('%s\n',[offset structure_fields{i} ': (' num2str(size(field,1))  ')' ]);
     44                        disp(sprintf('%s',[offset structure_fields{i} ': (' num2str(size(field,1))  ')' ]));
    4545                end
    4646        end
  • issm/trunk/src/m/classes/public/display/displaysolutionparameters.m

    r1249 r1251  
    99%      displaysolutionparameters(md)
    1010
    11 fprintf('   Solution parameters:\n');
    12 fprintf('\n      statics:\n');
    13 fprintf('         %s\n','Newton convergence criteria');
    14 fprintf('            eps_rel: %g      (velocity relative convergence criterion)\n',md.eps_rel);
    15 fprintf('            eps_abs: %g      (velocity absolute convergence criterion [m/yr], NaN -> no absolute criterion)\n',md.eps_abs);
    16 fprintf('            viscosity_overshoot: %g      (over-shooting constant new=new+C*(new-old))\n',md.viscosity_overshoot);
    17 fprintf('         penalty_offset: %g      (offset used by penalties: penalty = Kmax*10^offset)\n',md.penalty_offset);
    18 fprintf('         penalty_melting: %g      (penalty used to keep T<Tpmp)\n',md.penalty_melting);
    19 fprintf('         penalty_lock: %g      (counter used to lock penalties that zig zag)\n',md.penalty_lock);
    20 fprintf('         lowmem: %i      (Set to 1 if you are running low on cluster memory)\n',md.lowmem);
    21 fprintf('         sparsity: %g      (matrix sparsity. Set to .001 for < 1M dof, .0001 for 5M dof, and .00001 for > 10M dof\n',md.sparsity);
    22 fprintf('         connectivity: %i      (element connectivity)\n',md.connectivity);
    23 fprintf('         debug: %i      (output debug statements when possible yes-> 1, no -> 0. Default is 1\n',md.debug);
    24 fprintf('         element_debug: %i      (output debug statements for elementswhen possible yes-> 1, no -> 0. Default is 0\n',md.element_debug);
    25 fprintf('         element_debugid: %i      (if element_debug on, id of element for which to output messages\n',md.element_debugid);
    26 fprintf('         debug: %i      (output debug statements when possible yes-> 1, no -> 0. Default is 1');
    27 fprintf('      ''%s''\n','transient');
    28 fprintf('         dt: %g ( time step in years)\n',md.dt/md.yts);
    29 fprintf('         ndt: %g ( time span in years)\n',md.ndt/md.yts);
    30 fprintf('         artificial_diffusivity: %i (yes->1, no->0)\n',md.artificial_diffusivity);
    31 fprintf('         minh: %g (minimum thickness to avoid stiffness singularity)\n',md.minh);
    32 fprintf('         timestepping: %i ( adptative time stepping implemented - default to 0)\n',md.timestepping);
    33 fprintf('         deltaH: %g ( minimum thickness difference between two time steps)\n',md.deltaH);
    34 fprintf('         DeltaH: %g ( maximum thickness difference between two time steps)\n',md.DeltaH);
    35 fprintf('         deltaT: %g ( minimum temperature difference between two time steps)\n',md.deltaT);
    36 fprintf('         DeltaT: %g ( maximum temperature difference between two time steps)\n',md.DeltaT);
    37 fprintf('         timeacc: %g ( multiplier to time step when time stepping increases time step)\n',md.timeacc);
    38 fprintf('         timedec: %g ( multiplier to time step when time stepping decresaes time step)\n',md.timedec);
     11disp(sprintf('   Solution parameters:'));
    3912
    40 fprintf('\n      control:\n');
    41 fprintf('         control_type: %s (control type, ex: ''drag'', or ''B'')\n',md.control_type);
    42 fprintf('         fit: (%g)      ( 0 -> absolute, 1 -> relative, 2 -> logarithmic. default is absolute)\n',length(md.fit));
    43 fprintf('         meanvel: %g      (velocity scaling factor when evaluating relative or logarithmic misfit)\n',md.meanvel);
    44 fprintf('         epsvel: %g      ( for relative fit, avoids misfit becoming infinity, for logarithmic fit, threshold for velocity)\n',md.epsvel);
    45 fprintf('         nsteps: %i      (number of optimization searches)\n',md.nsteps);
    46 fprintf('         optscal: (%i %i)      (scaling factor on gradient direction during optimization, for each optimization step)\n',size(md.optscal,1),size(md.optscal,2));
    47 fprintf('         mincontrolconstraint: %f      (minimum contraint for the controlled parameters, NaN -> no constraint)\n',md.mincontrolconstraint);
    48 fprintf('         maxcontrolconstraint: %f      (maximum contraint for the controlled parameters, NaN -> no constraint)\n',md.maxcontrolconstraint);
    49 fprintf('         maxiter: (%i)      (maximum iterations during each optimization step)\n',length(md.maxiter));
    50 fprintf('         tolx: %f      (minimum tolerance which will stop one optimization search)\n',md.tolx);
    51 fprintf('         plot: %i      (visualization of the results of each iteration yes -> 1 no -> 0. Default is 1)\n',md.plot);
     13disp(sprintf('\n      statics:'));
     14disp(sprintf('         %s','Newton convergence criteria'));
     15disp(sprintf('            eps_rel: %g      (velocity relative convergence criterion)',md.eps_rel));
     16disp(sprintf('            eps_abs: %g      (velocity absolute convergence criterion [m/yr], NaN -> no absolute criterion)',md.eps_abs));
     17disp(sprintf('            viscosity_overshoot: %g      (over-shooting constant new=new+C*(new-old))',md.viscosity_overshoot));
     18disp(sprintf('         penalty_offset: %g      (offset used by penalties: penalty = Kmax*10^offset)',md.penalty_offset));
     19disp(sprintf('         penalty_melting: %g      (penalty used to keep T<Tpmp)',md.penalty_melting));
     20disp(sprintf('         penalty_lock: %g      (counter used to lock penalties that zig zag)',md.penalty_lock));
     21disp(sprintf('         lowmem: %i      (Set to 1 if you are running low on cluster memory)',md.lowmem));
     22disp(sprintf('         sparsity: %g      (matrix sparsity. Set to .001 for < 1M dof, .0001 for 5M dof, and .00001 for > 10M dof',md.sparsity));
     23disp(sprintf('         connectivity: %i      (element connectivity)',md.connectivity));
     24disp(sprintf('         debug: %i      (output debug statements when possible yes-> 1, no -> 0. Default is 1',md.debug));
     25disp(sprintf('         element_debug: %i      (output debug statements for elementswhen possible yes-> 1, no -> 0. Default is 0',md.element_debug));
     26disp(sprintf('         element_debugid: %i      (if element_debug on, id of element for which to output messages',md.element_debugid));
     27disp(sprintf('         debug: %i      (output debug statements when possible yes-> 1, no -> 0. Default is 1'));
    5228
    53 fprintf('\n      mesh:\n');
    54 fprintf('         mesh_domainoutline: %s      (domain outlines)\n',md.mesh_domainoutline);
    55 fprintf('         mesh_riftoutline: %s      (rift outlines)\n',md.mesh_riftoutline);
    56 fprintf('         mesh_resolution: (%g)      (mesh resolutoin)\n',md.mesh_resolution);
     29disp(sprintf('\n      transient:'));
     30disp(sprintf('         dt: %g ( time step in years)',md.dt/md.yts));
     31disp(sprintf('         ndt: %g ( time span in years)',md.ndt/md.yts));
     32disp(sprintf('         artificial_diffusivity: %i (yes->1, no->0)',md.artificial_diffusivity));
     33disp(sprintf('         minh: %g (minimum thickness to avoid stiffness singularity)',md.minh));
     34disp(sprintf('         timestepping: %i ( adptative time stepping implemented - default to 0)',md.timestepping));
     35disp(sprintf('         deltaH: %g ( minimum thickness difference between two time steps)',md.deltaH));
     36disp(sprintf('         DeltaH: %g ( maximum thickness difference between two time steps)',md.DeltaH));
     37disp(sprintf('         deltaT: %g ( minimum temperature difference between two time steps)',md.deltaT));
     38disp(sprintf('         DeltaT: %g ( maximum temperature difference between two time steps)',md.DeltaT));
     39disp(sprintf('         timeacc: %g ( multiplier to time step when time stepping increases time step)',md.timeacc));
     40disp(sprintf('         timedec: %g ( multiplier to time step when time stepping decresaes time step)',md.timedec));
     41
     42disp(sprintf('\n      control:'));
     43disp(sprintf('         control_type: %s (control type, ex: ''drag'', or ''B'')',md.control_type));
     44disp(sprintf('         fit: (%g)      ( 0 -> absolute, 1 -> relative, 2 -> logarithmic. default is absolute)',length(md.fit)));
     45disp(sprintf('         meanvel: %g      (velocity scaling factor when evaluating relative or logarithmic misfit)',md.meanvel));
     46disp(sprintf('         epsvel: %g      ( for relative fit, avoids misfit becoming infinity, for logarithmic fit, threshold for velocity)',md.epsvel));
     47disp(sprintf('         nsteps: %i      (number of optimization searches)',md.nsteps));
     48disp(sprintf('         optscal: (%i %i)      (scaling factor on gradient direction during optimization, for each optimization step)',size(md.optscal,1),size(md.optscal,2)));
     49disp(sprintf('         mincontrolconstraint: %f      (minimum contraint for the controlled parameters, NaN -> no constraint)',md.mincontrolconstraint));
     50disp(sprintf('         maxcontrolconstraint: %f      (maximum contraint for the controlled parameters, NaN -> no constraint)',md.maxcontrolconstraint));
     51disp(sprintf('         maxiter: (%i)      (maximum iterations during each optimization step)',length(md.maxiter)));
     52disp(sprintf('         tolx: %f      (minimum tolerance which will stop one optimization search)',md.tolx));
     53disp(sprintf('         plot: %i      (visualization of the results of each iteration yes -> 1 no -> 0. Default is 1)',md.plot));
     54
     55disp(sprintf('\n      mesh:'));
     56disp(sprintf('         mesh_domainoutline: %s      (domain outlines)',md.mesh_domainoutline));
     57disp(sprintf('         mesh_riftoutline: %s      (rift outlines)',md.mesh_riftoutline));
     58disp(sprintf('         mesh_resolution: (%g)      (mesh resolutoin)',md.mesh_resolution));
    5759
    5860%mesh2grid type
    59 fprintf('\n      mesh2grid:\n');
     61disp(sprintf('\n      mesh2grid:'));
    6062mesh2grid_string='';
    6163for i=1:length(md.mesh2grid_parameters),
     
    6466end
    6567mesh2grid_string=mesh2grid_string(1:length(mesh2grid_string)-5);
    66 fprintf('         mesh2grid_parameters: %s %s\n',mesh2grid_string,'(list of parameters for which mesh 2 grid interpolation is carried out; ex: {''drag''}, or {''drag'',''B''})');
     68disp(sprintf('         mesh2grid_parameters: %s %s',mesh2grid_string,'(list of parameters for which mesh 2 grid interpolation is carried out; ex: {''drag''}, or {''drag'',''B''})'));
    6769%mesh2grid interpolation
    6870mesh2grid_interpstring='';
     
    7274end
    7375mesh2grid_interpstring=mesh2grid_interpstring(1:length(mesh2grid_interpstring)-5);
    74 fprintf('         mesh2grid_interpolation: %s %s\n',mesh2grid_interpstring,'(list of interpolation (''node'' or ''element'') for each parameter ex: {''node''}, or {''node'',''element''})');
     76disp(sprintf('         mesh2grid_interpolation: %s %s',mesh2grid_interpstring,'(list of interpolation (''node'' or ''element'') for each parameter ex: {''node''}, or {''node'',''element''})'));
    7577
    7678%mesh2grid filter
     
    8183end
    8284mesh2grid_filterstring=mesh2grid_filterstring(1:length(mesh2grid_filterstring)-5);
    83 fprintf('         mesh2grid_filter: %s %s\n',mesh2grid_filterstring,'(list of filter (''average'' or ''nearest'') for each parameter ex: {''average''}, or {''average'',''nearest''})');
    84 fprintf('         mesh2grid_cornereast: %g ( corner east of square grid)\n',md.mesh2grid_cornereast);
    85 fprintf('         mesh2grid_cornernorth: %g ( corner north of square grid)\n',md.mesh2grid_cornernorth);
    86 fprintf('         mesh2grid_xposting: %g (x  posting of grid (in m))\n',md.mesh2grid_xposting);
    87 fprintf('         mesh2grid_yposting: %g (y  posting of grid (in m))\n',md.mesh2grid_yposting);
    88 fprintf('         mesh2grid_nlines: %g ( number of grid lines)\n',md.mesh2grid_nlines);
    89 fprintf('         mesh2grid_ncolumns: %g ( number of grid columns)\n',md.mesh2grid_ncolumns);
    90 fprintf('         mesh2grid_windowsize: %g ( size of filter )\n',md.mesh2grid_windowsize);
    91 
    92 %parallelisation
    93 md.parallel
     85disp(sprintf('         mesh2grid_filter: %s %s',mesh2grid_filterstring,'(list of filter (''average'' or ''nearest'') for each parameter ex: {''average''}, or {''average'',''nearest''})'));
     86disp(sprintf('         mesh2grid_cornereast: %g ( corner east of square grid)',md.mesh2grid_cornereast));
     87disp(sprintf('         mesh2grid_cornernorth: %g ( corner north of square grid)',md.mesh2grid_cornernorth));
     88disp(sprintf('         mesh2grid_xposting: %g (x  posting of grid (in m))',md.mesh2grid_xposting));
     89disp(sprintf('         mesh2grid_yposting: %g (y  posting of grid (in m))',md.mesh2grid_yposting));
     90disp(sprintf('         mesh2grid_nlines: %g ( number of grid lines)',md.mesh2grid_nlines));
     91disp(sprintf('         mesh2grid_ncolumns: %g ( number of grid columns)',md.mesh2grid_ncolumns));
     92disp(sprintf('         mesh2grid_windowsize: %g ( size of filter )',md.mesh2grid_windowsize));
    9493
    9594%parameteroutput type
     
    101100parameteroutput_string=parameteroutput_string(1:length(parameteroutput_string)-5);
    102101
    103 fprintf('\n      output:\n');
    104 fprintf('         parameteroutput: %s %s\n',parameteroutput_string,...
    105                        '(list of output parameters recovered in the solution sequences: ex: {''viscousheating'',''stress''})\n');
     102disp(sprintf('\n      output:'));
     103disp(sprintf('         parameteroutput: %s %s',parameteroutput_string,...
     104        '(list of output parameters recovered in the solution sequences: ex: {''viscousheating'',''stress''})'));
Note: See TracChangeset for help on using the changeset viewer.