Ignore:
Timestamp:
05/10/18 10:24:27 (7 years ago)
Author:
Mathieu Morlighem
Message:

merged trunk-jpl and trunk for revision 22757

Location:
issm/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk

  • issm/trunk/src

  • issm/trunk/src/m/classes/model.m

    r21729 r22758  
    4040                levelset                          = 0;
    4141                calving          = 0;
     42                love                         = 0;
    4243                gia                               = 0;
    4344                esa              = 0;
     
    127128                        %2016 October 11
    128129                        if isa(md.esa,'double'); md.esa=esa(); end
     130                        %2017 Dec 21st (needs to be here)
     131                        if isempty(md.settings)
     132                                disp('Warning: md.settings had to be reset, make sure to adjust md.settings.output_frequency and other fields');
     133                                md.settings = issmsettings();
     134                        end
    129135                        %2017 February 10th
    130136                        if md.settings.solver_residue_threshold==0,
     
    135141                        %2017 May 4th
    136142                        if isa(md.amr,'double'); md.amr=amr(); end
     143                        %2017 Aug 29th
     144                        if isa(md.love,'double'); md.love=fourierlove(); end
     145                        %2017 Oct 26th
     146                        if isa(md.calving,'calvingdev')
     147                                disp('Warning: calvingdev is now calvingvonmises');
     148                                md.calving=calvingvonmises(md.calving);
     149                        end
    137150
    138151                end% }}}
     
    177190                        %Start with changing all the fields from the 3d mesh
    178191
    179                         %dealing with the friciton law
     192                        %dealing with the friction law
    180193                        %drag is limited to nodes that are on the bedrock.
    181194                        if isa(md.friction,'friction'),
    182195                                md.friction.coefficient=project2d(md,md.friction.coefficient,1);
     196                                md.friction.p=project2d(md,md.friction.p,1);
     197                                md.friction.q=project2d(md,md.friction.q,1);
     198                        elseif isa(md.friction,'frictioncoulomb'),
     199                                md.friction.coefficient=project2d(md,md.friction.coefficient,1);
     200                                md.friction.coefficientcoulomb=project2d(md,md.friction.coefficientcoulomb,1);
    183201                                md.friction.p=project2d(md,md.friction.p,1);
    184202                                md.friction.q=project2d(md,md.friction.q,1);
     
    201219                        else
    202220                                disp('friction type not supported');
    203             end
     221                        end
    204222
    205223                        %observations
     
    260278                                if(md.hydrology.isefficientlayer==1)
    261279                                        md.hydrology.spcepl_head=project2d(md,md.hydrology.spcepl_head,1);
    262                     end
    263             end
     280                                end
     281                        end
    264282                       
    265283                        %materials
     
    308326                        if ~isnan(md.mask.ice_levelset),
    309327                                md.mask.ice_levelset=project2d(md,md.mask.ice_levelset,1);
     328                        end
     329
     330                        %outputdefinitions
     331                        for i=1:length(md.outputdefinition.definitions)
     332                                if isobject(md.outputdefinition.definitions{i})
     333                                        %get subfields
     334                                        solutionsubfields=fields(md.outputdefinition.definitions{i});
     335                                        for j=1:length(solutionsubfields),
     336                                                field=md.outputdefinition.definitions{i}.(solutionsubfields{j});
     337                                                if length(field)==md.mesh.numberofvertices | length(field)==md.mesh.numberofelements,
     338                                                        md.outputdefinition.definitions{i}.(solutionsubfields{j})=project2d(md,md.outputdefinition.definitions{i}.(solutionsubfields{j}),1);
     339                                                end
     340                                        end
     341                                end
    310342                        end
    311343
     
    320352                        if numel(md.mesh.long)==md.mesh.numberofvertices,       mesh.long=project2d(md,md.mesh.long,1); end
    321353                        mesh.epsg=md.mesh.epsg;
     354                        if numel(md.mesh.scale_factor)==md.mesh.numberofvertices,       mesh.scale_factor=project2d(md,md.mesh.scale_factor,1); end
    322355                        if ~isnan(md.mesh.vertexonboundary), mesh.vertexonboundary=project2d(md,md.mesh.vertexonboundary,1); end
    323356                        if ~isnan(md.mesh.elementconnectivity), mesh.elementconnectivity=project2d(md,md.mesh.elementconnectivity,1); end
     
    607640                        end
    608641
     642                        %OutputDefinitions fields
     643                        for i=1:length(md1.outputdefinition.definitions),
     644                                if isobject(md1.outputdefinition.definitions{i})
     645                                        %get subfields
     646                                        solutionsubfields=fields(md1.outputdefinition.definitions{i});
     647                                        for j=1:length(solutionsubfields),
     648                                                field=md1.outputdefinition.definitions{i}.(solutionsubfields{j});
     649                                                if length(field)==numberofvertices1,
     650                                                        md2.outputdefinition.definitions{i}.(solutionsubfields{j})=field(pos_node);
     651                                                elseif length(field)==numberofelements1,
     652                                                        md2.outputdefinition.definitions{i}.(solutionsubfields{j})=field(pos_elem);
     653                                                end
     654                                        end
     655                                end
     656                        end
     657
    609658                        %Keep track of pos_node and pos_elem
    610659                        md2.mesh.extractedvertices=pos_node;
     
    689738                        md.mesh.long                        = mesh2d.long;
    690739                        md.mesh.epsg                        = mesh2d.epsg;
     740                        md.mesh.scale_factor                = mesh2d.scale_factor;
    691741
    692742                        md.mesh.vertexonboundary            = mesh2d.vertexonboundary;
     
    762812                        md.mesh.lat=project3d(md,'vector',md.mesh.lat,'type','node');
    763813                        md.mesh.long=project3d(md,'vector',md.mesh.long,'type','node');
     814                        md.mesh.scale_factor=project3d(md,'vector',md.mesh.scale_factor,'type','node');
    764815
    765816                        md.geometry=extrude(md.geometry,md);
     
    793844                        md.qmu=extrude(md.qmu,md);
    794845                        md.basalforcings=extrude(md.basalforcings,md);
     846                        md.outputdefinition=extrude(md.outputdefinition,md);
    795847
    796848                        %increase connectivity if less than 25:
     
    915967                        if isfield(structmd,'lat'), md.mesh.lat=structmd.lat; end
    916968                        if isfield(structmd,'long'), md.mesh.long=structmd.long; end
     969                        if isfield(structmd,'scale_factor'), md.mesh.scale_factor=structmd.scale_factor; end
    917970                        if isfield(structmd,'segments'), md.mesh.segments=structmd.segments; end
    918971                        if isfield(structmd,'segmentmarkers'), md.mesh.segmentmarkers=structmd.segmentmarkers; end
     
    11021155                        md.debug            = debug();
    11031156                        md.verbose          = verbose();
    1104                         md.settings         = settings();
     1157                        md.settings         = issmsettings();
    11051158                        md.toolkits         = toolkits();
    11061159                        md.cluster          = generic();
     
    11121165                        md.steadystate      = steadystate();
    11131166                        md.transient        = transient();
    1114                         md.levelset                       = levelset();
     1167                        md.levelset         = levelset();
    11151168                        md.calving          = calving();
    1116                         md.gia                            = giaivins();
     1169                        md.gia              = giaivins();
     1170                        md.love             = fourierlove();
    11171171                        md.esa              = esa();
    11181172                        md.autodiff         = autodiff();
    11191173                        md.inversion        = inversion();
    11201174                        md.qmu              = qmu();
    1121                         md.amr                            = amr();
     1175                        md.amr              = amr();
    11221176                        md.radaroverlay     = radaroverlay();
    11231177                        md.results          = struct();
     
    12881342                        disp(sprintf('%19s: %-22s -- %s','calving'         ,['[1x1 ' class(self.calving) ']'],'parameters for calving'));
    12891343                        disp(sprintf('%19s: %-22s -- %s','gia'        ,['[1x1 ' class(self.gia) ']'],'parameters for gia solution'));
     1344                        disp(sprintf('%19s: %-22s -- %s','love'        ,['[1x1 ' class(self.love) ']'],'parameters for love solution'));
    12901345                        disp(sprintf('%19s: %-22s -- %s','esa'             ,['[1x1 ' class(self.esa) ']'],'parameters for elastic adjustment solution'));
    12911346                        disp(sprintf('%19s: %-22s -- %s','autodiff'        ,['[1x1 ' class(self.autodiff) ']'],'automatic differentiation parameters'));
Note: See TracChangeset for help on using the changeset viewer.