Changeset 9075
- Timestamp:
- 07/19/11 16:28:47 (14 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
r9002 r9075 42 42 43 43 /*Transient or static?:*/ 44 if(M==iomodel->numberofvertices){ //{{{144 if(M==iomodel->numberofvertices){ 45 45 /*static: just create Spc objects*/ 46 47 48 /*Initialize counter*/49 46 count=0; 50 47 … … 60 57 count++; 61 58 } 62 63 } //if((my_nodes[i]==1)) 59 } 64 60 } 65 } //}}}66 else{ //{{{161 } 62 else{ 67 63 /*transient: create transient Spct objects. Same logic, except we need to retrieve 68 64 * various times and values to initialize an Spct object: */ 69 70 /*Initialize counter*/71 65 count=0; 72 66 … … 78 72 /*unit conversion: */ 79 73 UnitConversion(times,N,ExtToIuEnum,TimeEnum); 80 81 82 74 83 75 /*Create spcs from x,y,z, as well as the spc values on those spcs: */ … … 100 92 } 101 93 xfree((void**)&values); 102 } //if((my_nodes[i]==1))94 } 103 95 } 104 } //}}}96 } 105 97 106 98 /*Free ressources:*/ -
issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp
r8926 r9075 1 /*2 * CreateConstraintsPrognostic.c:3 */4 5 1 #include "../../../Container/Container.h" 2 #include "../../../modules/modules.h" 6 3 #include "../../../toolkits/toolkits.h" 7 4 #include "../../../EnumDefinitions/EnumDefinitions.h" … … 27 24 if(!constraints) constraints = new Constraints(ConstraintsEnum); 28 25 29 /*Do not add constraints in DG */26 /*Do not add constraints in DG, they are weakly imposed*/ 30 27 if(!iomodel->prognostic_DG){ 31 32 /*Fetch data: */ 33 IoModelFetchData(&iomodel->spcthickness,NULL,NULL,iomodel_handle,SpcthicknessEnum); 34 35 /*Initialize counter*/ 36 count=0; 37 38 /*Create spcs from x,y,z, as well as the spc values on those spcs: */ 39 for (i=0;i<iomodel->numberofvertices;i++){ 40 /*keep only this partition's nodes:*/ 41 if((iomodel->my_vertices[i])){ 42 43 if ((int)iomodel->spcthickness[2*i]){ 44 45 constraints->AddObject(new Spc(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,*(iomodel->spcthickness+2*i+1),PrognosticAnalysisEnum)); 46 count++; 47 } 48 } //if((my_vertices[i])) 49 } 50 51 /*Free data: */ 52 xfree((void**)&iomodel->spcthickness); 28 IoModelToConstraintsx(constraints,iomodel,iomodel_handle,SpcthicknessEnum,PrognosticAnalysisEnum); 53 29 } 54 30 -
issm/trunk/src/c/objects/Elements/Tria.cpp
r9012 r9075 775 775 /*Constants*/ 776 776 const int numdof=NDOF2*NUMVERTICES; 777 _error_("STOP"); 777 778 778 779 /*Intermediaries*/ -
issm/trunk/src/m/classes/model.m
r9013 r9075 15 15 name = {'',true,'String'}; 16 16 runtimename = {'',false}; %name used when running a parallel job 17 counter = {0,false}; %1 mesh, 2 geography, 3 parameterize17 counter = {0,false}; 18 18 domainoutline = {NaN,false}; 19 19 riftoutline = {NaN,false}; … … 346 346 end 347 347 methods (Static) 348 function md = l oadobj(md) % {{{348 function md = lllloadobj(md) % {{{ 349 349 % This function is directly called by matlab when a model object is 350 350 % loaded. If the input is a struct it is an old version of model and -
issm/trunk/src/m/model/display/displaybc.m
r8823 r9075 25 25 26 26 disp(sprintf('\n prognostic:')); 27 fielddisplay(md,'spcthickness',' constraints flag list (first column) and values (second column)');27 fielddisplay(md,'spcthickness','thickness constraints (NaN means no constraint)'); 28 28 29 29 disp(sprintf('\n thermal:')); 30 fielddisplay(md,'spctemperature',' constraints flag list (first column) and values (second column)');30 fielddisplay(md,'spctemperature','temperature constraints (NaN means no constraint)'); 31 31 fielddisplay(md,'basal_melting_rate','basal melting rate [m/a]'); -
issm/trunk/src/m/model/display/displayprognostic.m
r4965 r9075 18 18 19 19 disp(sprintf('\n boundary conditions:')); 20 fielddisplay(md,'spcthickness',' constraints flag list (first column) and values (second column)');20 fielddisplay(md,'spcthickness','thickness constraints (NaN means no constraint)'); -
issm/trunk/src/m/model/ismodelselfconsistent.m
r9049 r9075 224 224 if any(md.thickness<=0), 225 225 pos=find(md.thickness<=0); 226 if any( find(md.spcthickness(pos,1)==0)),226 if any(isnan(md.spcthickness(pos))), 227 227 message(['model not consistent: model ' md.name ' has some nodes with 0 thickness']); 228 228 end … … 369 369 if any(md.thickness<=0), 370 370 pos=find(md.thickness<=0); 371 if any( find(md.spcthickness(pos,1)==0)),371 if any(isnan(md.spcthickness(pos))), 372 372 message(['model not consistent: model ' md.name ' has some nodes with 0 thickness']); 373 373 end … … 458 458 checksize(md,fields,[md.numberofnodes 1]); 459 459 checknan(md,fields); 460 461 %CHECK THAT WE ARE NOT FULLY CONSTRAINED462 if (md.dim==2),463 if isnan(find(~md.spcthickness(:,1))),464 message(['model not consistent: model ' md.name ' is totally constrained for prognostic, no need to solve!']);465 end466 end467 460 %}}} 468 461 case HydrologyAnalysisEnum, … … 560 553 checksize(md,fields,[md.numberofnodes 1]); 561 554 checknan(md,fields); 562 563 %SPC564 % if ~md.prognostic_DG,565 % if any(md.spcthickness(find(md.nodeonboundary))~=1),566 % message(['model not consistent: model ' md.name ' should have all the nodes on boundary constrained in field spcthickness']);567 % end568 % end569 555 570 556 %Triangle with zero velocity -
issm/trunk/src/m/model/outflow.m
r8298 r9075 1 1 function flag=outflow(md); 2 %OUTFLOW - flag nodes on outflux boundary 3 % 4 % Usage: 5 % flag=outflow(md); 2 6 3 7 A=md.segments(:,1); -
issm/trunk/src/m/solvers/solver_linear.m
r8814 r9075 9 9 10 10 [K_ff,K_fs,p_f,df,kmax]=SystemMatrices(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters); 11 full(K_ff) 12 condest(K_ff) 11 13 ys =CreateNodalConstraints(femmodel.nodes,configuration_type); 12 14 p_f =Reduceload( p_f, K_fs, ys); 15 full(p_f) 13 16 14 17 issmprintf(VerboseSolver(),'%s%g',' condition number of stiffness matrix: ',condest(K_ff)); 15 18 u_f=Solver(K_ff,p_f,[],df,femmodel.parameters); 19 u_f 20 error('stop') 16 21 u_g= Mergesolutionfromftog( u_f, ys, femmodel.nodes,femmodel.parameters); 17 22 [femmodel.elements,femmodel.materials]=InputUpdateFromSolution(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,u_g); -
issm/trunk/src/m/utils/BC/SetIceSheetBC.m
r9002 r9075 58 58 end 59 59 60 md.spcthickness= zeros(md.numberofnodes,2);60 md.spcthickness=NaN*ones(md.numberofnodes,1); 61 61 62 62 if (length(md.observed_temperature)==md.numberofnodes), -
issm/trunk/src/m/utils/BC/SetIceShelfBC.m
r9002 r9075 90 90 end 91 91 92 md.spcthickness= zeros(md.numberofnodes,2);92 md.spcthickness=NaN*ones(md.numberofnodes,1); 93 93 94 94 if (length(md.observed_temperature)==md.numberofnodes), -
issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m
r9002 r9075 101 101 end 102 102 103 md.spcthickness= zeros(md.numberofnodes,2);103 md.spcthickness=NaN*ones(md.numberofnodes,1); 104 104 105 105 if (length(md.observed_temperature)==md.numberofnodes), -
issm/trunk/src/m/utils/Interp/PatchToVec.m
r8726 r9075 8 8 switch(Patch.interpolation(1)), 9 9 case P0Enum, 10 vec(Patch.element)=Patch.value; 10 %vec(Patch.element)=Patch.value; 11 connectivity=sparse(Patch.index(:),1,1); 12 value =sparse(Patch.index(:),1,Patch.value(:)); 13 vec=full(value./connectivity); 11 14 case P1Enum, 12 15 connectivity=sparse(Patch.index(:),1,1);
Note:
See TracChangeset
for help on using the changeset viewer.