Changeset 246 for trunk/src/civ.m


Ignore:
Timestamp:
Apr 28, 2011, 10:52:31 AM (13 years ago)
Author:
sommeria
Message:

thin plate shell (patch) introduced

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r244 r246  
    6262% Update handles structure
    6363guidata(hObject, handles);
    64 
     64set(hObject,'WindowButtonUpFcn',{'mouse_up_GUI',handles}) %set mouse action (zoom on uicontrols)
    6565%default initial parameters
    6666filebase=''; % root file name ('filebase'.civ)
     
    334334    browse.nom_type_nc=nom_type;
    335335    ind_opening=2;% propose 'fix' as the default option
    336     Data=nc2struct(fileinput,[]);
    337     if isfield(Data,'absolut_time_T0')%test for civx files
     336    Data=nc2struct(fileinput,'ListGlobalAttribute','CivStage','absolut_time_T0','fix','patch','civ2','fix2');
     337    if ~isempty(Data.CivStage)%test for civ files
     338        ind_opening=Data.CivStage;
     339        set(handles.CivAll,'Value',3)
     340    end
     341    if ~isempty(Data.absolut_time_T0)%test for civx files
     342        set(handles.CivAll,'Value',1)
    338343        if isfield(Data,'fix') && isequal(Data.fix,1)
    339344            ind_opening=3;
    340345        end
    341         if isfield(Data,'patch') && isequal(Data.patch,1)
     346        if isequal(Data.patch,1)
    342347            ind_opening=4;
    343348        end
    344         if isfield(Data,'civ2') && isequal(Data.civ2,1)
     349        if isequal(Data.civ2,1)
    345350            ind_opening=5;
    346351        end
    347         if isfield(Data,'fix2') && isequal(Data.fix2,1)
     352        if isequal(Data.fix2,1)
    348353            ind_opening=6;
    349354        end
     
    46834688    par_civ1.T0=0;
    46844689    par_civ1.Dt=1;
    4685     Data=civ_uvmat(par_civ1);
     4690    Param.Civ1=par_civ1;
     4691    Data=civ_uvmat(Param);
    46864692%     stepx=str2num(par_civ1.dx);
    46874693%     stepy=str2num(par_civ1.dy);
     
    48774883function open_view_field(hObject, eventdata)
    48784884%-------------------------------------------------------------------
    4879      list=get(gcbo,'String');
    4880      index=get(gcbo,'Value');
    4881      rootroot=get(gcbo,'UserData');
     4885     list=get(hObject,'String');
     4886     index=get(hObject,'Value');
     4887     rootroot=get(hObject,'UserData');
    48824888     filename=list{index};
    48834889     ind_dot=findstr(filename,'...');
    48844890     filename=filename(1:ind_dot-1);
    48854891      filename=fullfile(rootroot,filename);
     4892      delete(get(hObject,'parent'))%delete the display figure to stop the check process
    48864893      if exist(filename,'file')%visualise the vel field if it exists
    4887         %[Field,VelTypeOut]=read_civxdata(filename);
    4888         %view_field(Field)
    48894894        uvmat(filename)
    48904895        set(gcbo,'Value',1)
Note: See TracChangeset for help on using the changeset viewer.