Changeset 15275


Ignore:
Timestamp:
06/17/13 16:20:02 (12 years ago)
Author:
bdef
Message:

CHG:Adding a directory to put the result in the vtk Output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/contrib/paraview/writeVTKcell.m

    r15106 r15275  
    1515% Basile de Fleurian, modified from:
    1616% (c) Daniel Peterseim, 2009-11-07
     17
     18[path,name,ext]=fileparts(filename)
     19separator=filesep
     20mkdir(filename)
    1721
    1822points=[model.mesh.x model.mesh.y model.mesh.z];
     
    4246if num_of_timesteps==1; %just one timestep only write one file
    4347
    44         FID = fopen(strcat(filename,'.vtk'),'w+');
     48        FID = fopen(strcat(path,filesep,name,filesep,name,'.vtk'),'w+');
    4549        fprintf(FID,'# vtk DataFile Version 2.0 \n');
    4650        fprintf(FID,'Data for run %s \n',model.miscellaneous.name);
     
    8084        for i=1:num_of_timesteps;
    8185                timestep=sol_struct(i).step;
    82                 FID = fopen(strcat(filename,'.vtk',int2str(timestep),'.vtk'),'w+');
     86                FID = fopen(strcat(path,filesep,name,filesep,name,'.vtk',int2str(timestep),'.vtk'),'w+');
    8387                fprintf(FID,'# vtk DataFile Version 2.0 \n');
    8488                fprintf(FID,'Data for run %s \n',model.miscellaneous.name);
Note: See TracChangeset for help on using the changeset viewer.