Changeset 8319
- Timestamp:
- 05/16/11 16:58:02 (14 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 3 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
r8302 r8319 443 443 VxMeshEnum, 444 444 VyMeshEnum, 445 VzMeshEnum 445 VzMeshEnum, 446 IsDiagnosticEnum, 447 IsPrognosticEnum, 448 IsThermalEnum 446 449 }; 447 450 -
issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp
r8287 r8319 387 387 case VyMeshEnum : return "VyMesh"; 388 388 case VzMeshEnum : return "VzMesh"; 389 case IsDiagnosticEnum : return "IsDiagnostic"; 390 case IsPrognosticEnum : return "IsPrognostic"; 391 case IsThermalEnum : return "IsThermal"; 389 392 default : return "unknown"; 390 393 -
issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp
r7848 r8319 80 80 parameters->AddObject(new IntParam(GroundingLineMigrationEnum,iomodel->gl_migration)); 81 81 parameters->AddObject(new IntParam(RheologyLawEnum,iomodel->rheology_law)); 82 parameters->AddObject(new BoolParam(IsDiagnosticEnum,iomodel->isdiagnostic)); 83 parameters->AddObject(new BoolParam(IsPrognosticEnum,iomodel->isprognostic)); 84 parameters->AddObject(new BoolParam(IsThermalEnum,iomodel->isthermal)); 82 85 83 86 /*Deal with more complex parameters*/ -
issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp
r8287 r8319 385 385 else if (strcmp(name,"VyMesh")==0) return VyMeshEnum; 386 386 else if (strcmp(name,"VzMesh")==0) return VzMeshEnum; 387 else if (strcmp(name,"IsDiagnostic")==0) return IsDiagnosticEnum; 388 else if (strcmp(name,"IsPrognostic")==0) return IsPrognosticEnum; 389 else if (strcmp(name,"IsThermal")==0) return IsThermalEnum; 387 390 else _error_("Enum %s not found",name); 388 391 -
issm/trunk/src/c/objects/IoModel.cpp
r8315 r8319 200 200 IoModelFetchData(&this->kff,iomodel_handle,"kff"); 201 201 IoModelFetchData(&this->gl_migration,iomodel_handle,"gl_migration"); 202 IoModelFetchData(&this-> diagnostic_analysis,iomodel_handle,"diagnostic_analysis");203 IoModelFetchData(&this-> prognostic_analysis,iomodel_handle,"prognostic_analysis");204 IoModelFetchData(&this-> thermal_analysis,iomodel_handle,"thermal_analysis");202 IoModelFetchData(&this->isdiagnostic,iomodel_handle,"isdiagnostic"); 203 IoModelFetchData(&this->isprognostic,iomodel_handle,"isprognostic"); 204 IoModelFetchData(&this->isthermal,iomodel_handle,"isthermal"); 205 205 206 206 /*!Get thermal parameters: */ … … 371 371 this->shelf_dampening=0; 372 372 this->waitonlock=0; 373 this-> diagnostic_analysis=0;374 this-> prognostic_analysis=0;375 this-> thermal_analysis=0;373 this->isdiagnostic=0; 374 this->isprognostic=0; 375 this->isthermal=0; 376 376 377 377 /*!thermal parameters: */ -
issm/trunk/src/c/objects/IoModel.h
r8315 r8319 163 163 double waitonlock; 164 164 int kff; 165 int diagnostic_analysis;166 int prognostic_analysis;167 int thermal_analysis;165 int isdiagnostic; 166 int isprognostic; 167 int isthermal; 168 168 169 169 /*thermal parameters: */ -
issm/trunk/src/c/solutions/transient2d_core.cpp
r7809 r8319 20 20 int dim = -1; 21 21 int solution_type; 22 bool control_analysis ;22 bool control_analysis,isdiagnostic,isprognostic,isthermal; 23 23 bool time_adapt=false; 24 24 int output_frequency; … … 39 39 femmodel->parameters->FindParam(&time_adapt,TimeAdaptEnum); 40 40 femmodel->parameters->FindParam(&gl_migration,GroundingLineMigrationEnum); 41 femmodel->parameters->FindParam(&isdiagnostic,IsDiagnosticEnum); 42 femmodel->parameters->FindParam(&isprognostic,IsPrognosticEnum); 43 femmodel->parameters->FindParam(&isthermal,IsThermalEnum); 41 44 42 45 /*initialize: */ … … 57 60 _printf_(VerboseSolution(),"%s%g%s%i%s%g%s%g\n","time [yr]: ",time/yts," iteration number: ",step,"/",floor((finaltime-time)/dt)," dt [yr]: ",dt/yts); 58 61 59 _printf_(VerboseSolution(),"%s\n"," computing new velocity"); 60 diagnostic_core(femmodel); 62 if(isdiagnostic){ 63 _printf_(VerboseSolution(),"%s\n"," computing new velocity"); 64 diagnostic_core(femmodel); 65 } 61 66 62 _printf_(VerboseSolution(),"%s\n"," computing new thickness"); 63 prognostic_core(femmodel); 67 if(isprognostic){ 68 _printf_(VerboseSolution(),"%s\n"," computing new thickness"); 69 prognostic_core(femmodel); 70 } 64 71 65 72 if (gl_migration!=NoneEnum){ -
issm/trunk/src/c/solutions/transient3d_core.cpp
r7288 r8319 18 18 double finaltime; 19 19 double dt,yts; 20 bool control_analysis;20 bool control_analysis,isdiagnostic,isprognostic,isthermal; 21 21 bool time_adapt=false; 22 22 int solution_type; … … 35 35 femmodel->parameters->FindParam(&output_frequency,OutputFrequencyEnum); 36 36 femmodel->parameters->FindParam(&time_adapt,TimeAdaptEnum); 37 femmodel->parameters->FindParam(&isdiagnostic,IsDiagnosticEnum); 38 femmodel->parameters->FindParam(&isprognostic,IsPrognosticEnum); 39 femmodel->parameters->FindParam(&isthermal,IsThermalEnum); 37 40 38 41 /*initialize: */ … … 53 56 _printf_(VerboseSolution(),"%s%g%s%i%s%g%s%g\n","time [yr]: ",time/yts," iteration number: ",step,"/",floor((finaltime-time)/dt)," dt [yr]: ",dt/yts); 54 57 55 _printf_(VerboseSolution()," computing temperatures:\n"); 56 thermal_core_step(femmodel,step,time); 58 if(isthermal){ 59 _printf_(VerboseSolution()," computing temperatures:\n"); 60 thermal_core_step(femmodel,step,time); 61 } 57 62 63 if(isdiagnostic){ 58 64 _printf_(VerboseSolution(),"%s\n"," computing new velocity"); 59 65 diagnostic_core(femmodel); 66 } 60 67 61 _printf_(VerboseSolution(),"%s\n"," computing new thickness"); 62 prognostic_core(femmodel); 63 64 _printf_(VerboseSolution(),"%s\n"," updating vertices positions"); 65 UpdateVertexPositionsx(femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters); 68 if(isprognostic){ 69 _printf_(VerboseSolution(),"%s\n"," computing new thickness"); 70 prognostic_core(femmodel); 71 _printf_(VerboseSolution(),"%s\n"," updating vertices positions"); 72 UpdateVertexPositionsx(femmodel->elements, femmodel->nodes,femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters); 73 } 66 74 67 75 if(solution_type==Transient3DSolutionEnum && !control_analysis && (step%output_frequency==0 || time==finaltime)){ -
issm/trunk/src/m/classes/model.m
r8316 r8319 211 211 hydrostatic_adjustment=0; 212 212 213 % Analysis214 prognostic_analysis=0;215 diagnostic_analysis=0;216 thermal_analysis=0;213 %Transient flags 214 isprognostic=0; 215 isdiagnostic=0; 216 isthermal=0; 217 217 218 218 %Control … … 657 657 %Solution activated for transient runs. By default we do a 658 658 %full analysis: Diagnostic, Prognostic and Thermal 659 md. prognostic_analysis=1;660 md. diagnostic_analysis=1;661 md. thermal_analysis=1;659 md.isprognostic=1; 660 md.isdiagnostic=1; 661 md.isthermal=1; 662 662 663 663 %Control -
issm/trunk/src/m/model/display/displaytransient.m
r8309 r8319 10 10 11 11 disp('Transient parameters on a pure solution basis:'); 12 if md. diagnostic_analysis,12 if md.isdiagnostic, 13 13 displaydiagnostic(md); 14 14 else 15 disp(sprintf(' %s','no scheduled diagnostic. activate by doing md. diagnostic_analysis=1'));15 disp(sprintf(' %s','no scheduled diagnostic. activate by doing md.isdiagnostic=1')); 16 16 end 17 if md. prognostic_analysis,17 if md.isprognostic, 18 18 displayprognostic(md); 19 19 else 20 disp(sprintf(' %s','no scheduled prognostic. activate by doing md. prognostic_analysis=1'));20 disp(sprintf(' %s','no scheduled prognostic. activate by doing md.isprognostic=1')); 21 21 end 22 if md. thermal_analysis,22 if md.isthermal, 23 23 displaythermal(md); 24 24 else 25 disp(sprintf(' %s','no scheduled thermal. activate by doing md. thermal_analysis=1'));25 disp(sprintf(' %s','no scheduled thermal. activate by doing md.isthermal=1')); 26 26 end 27 27 -
issm/trunk/src/m/model/ismodelselfconsistent.m
r8313 r8319 273 273 error('model not consistent: field dt must be positive for a transient run') 274 274 end 275 276 275 if(md.cfl_coefficient>1 | md.cfl_coefficient<0), 277 276 error(['model not consistent: model ' md.name ' cfl_coefficient field should between 0 and 1']); 278 277 end 279 280 278 if(md.cfl_coefficient>1 | md.cfl_coefficient<0), 281 279 error(['model not consistent: model ' md.name ' cfl_coefficient field should between 0 and 1']); 280 end 281 if ~ismember(md.isdiagnostic,[0 1]), 282 error('model not consistent: isdiagnostic should be a scalar (1 or 0)'); 283 end 284 if ~ismember(md.isprognostic,[0 1]), 285 error('model not consistent: isprognostic should be a scalar (1 or 0)'); 286 end 287 if ~ismember(md.isthermal,[0 1]), 288 error('model not consistent: isthermal should be a scalar (1 or 0)'); 282 289 end 283 290 -
issm/trunk/src/m/model/marshall.m
r8313 r8319 101 101 102 102 %Transient 103 WriteData(fid,md. diagnostic_analysis,'Scalar','diagnostic_analysis');104 WriteData(fid,md. prognostic_analysis,'Scalar','prognostic_analysis');105 WriteData(fid,md. thermal_analysis,'Scalar','thermal_analysis');103 WriteData(fid,md.isdiagnostic,'Integer','isdiagnostic'); 104 WriteData(fid,md.isprognostic,'Integer','isprognostic'); 105 WriteData(fid,md.isthermal,'Integer','isthermal'); 106 106 107 107 %Get materials -
issm/trunk/src/m/solutions/transient2d_core.m
r7808 r8319 14 14 output_frequency=femmodel.parameters.OutputFrequency; 15 15 time_adapt=femmodel.parameters.TimeAdapt; 16 isdiagnostic=femmodel.parameters.IsDiagnostic; 17 isprognostic=femmodel.parameters.IsPrognostic; 18 isthermal=femmodel.parameters.IsThermal; 16 19 17 20 %Initialize … … 33 36 issmprintf(VerboseSolution,'\n%s%g%s%i%s%g\n','time [yr]: ',time,' iteration number: ',step,'/',floor(ndt/dt)); 34 37 35 issmprintf(VerboseSolution,'\n%s',[' computing new velocities']); 36 femmodel=diagnostic_core(femmodel); 38 if (isdiagnostic) 39 issmprintf(VerboseSolution,'\n%s',[' computing new velocities']); 40 femmodel=diagnostic_core(femmodel); 41 end 37 42 38 issmprintf(VerboseSolution,'\n%s',[' computing new thickness']); 39 femmodel=prognostic_core(femmodel); 43 if (isprognostic) 44 issmprintf(VerboseSolution,'\n%s',[' computing new thickness']); 45 femmodel=prognostic_core(femmodel); 46 end 40 47 41 48 if (solution_type==Transient2DSolutionEnum & ~control_analysis & (mod(step,output_frequency)==0 | time==ndt)), -
issm/trunk/src/m/solutions/transient3d_core.m
r7111 r8319 13 13 output_frequency=femmodel.parameters.OutputFrequency; 14 14 time_adapt=femmodel.parameters.TimeAdapt; 15 isdiagnostic=femmodel.parameters.IsDiagnostic; 16 isprognostic=femmodel.parameters.IsPrognostic; 17 isthermal=femmodel.parameters.IsThermal; 15 18 16 19 %Initialize … … 32 35 issmprintf(VerboseSolution,'\n%s%g%s%i%s%g\n','time [yr] ',time,' iteration number: ',step,'/',floor(ndt/dt)); 33 36 34 issmprintf(VerboseSolution,'\n%s',[' computing temperature']); 35 femmodel=thermal_core_step(femmodel); 37 if (isthermal) 38 issmprintf(VerboseSolution,'\n%s',[' computing temperature']); 39 femmodel=thermal_core_step(femmodel); 40 end 36 41 37 issmprintf(VerboseSolution,'\n%s',[' computing new velocities']); 38 femmodel=diagnostic_core(femmodel); 42 if (isdiagnostic) 43 issmprintf(VerboseSolution,'\n%s',[' computing new velocities']); 44 femmodel=diagnostic_core(femmodel); 45 end 39 46 40 issmprintf(VerboseSolution,'\n%s',[' computing new thickness']); 41 femmodel=prognostic_core(femmodel); 42 43 issmprintf(VerboseSolution,'\n%s',[' updating vertices position']); 44 [femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters]=UpdateVertexPositions(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters); 47 if (isprognostic) 48 issmprintf(VerboseSolution,'\n%s',[' computing new thickness']); 49 femmodel=prognostic_core(femmodel); 50 issmprintf(VerboseSolution,'\n%s',[' updating vertices position']); 51 [femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters]=... 52 UpdateVertexPositions(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters); 53 end 45 54 46 55 if (solution_type==Transient3DSolutionEnum & ~control_analysis & (mod(step,output_frequency)==0 | time==ndt)),
Note:
See TracChangeset
for help on using the changeset viewer.