Changeset 14734
- Timestamp:
- 04/24/13 09:22:21 (12 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/Makefile.am
r14727 r14734 509 509 ./modules/ModelProcessorx/Gia/CreateLoadsGia.cpp\ 510 510 ./modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp\ 511 ./modules/GiaDeflectionCorex/GiaDeflectionCorex.h 511 ./modules/GiaDeflectionCorex/GiaDeflectionCorex.h\ 512 ./classes/GiaDeflectionCoreArgs.h 512 513 513 514 #}}} -
issm/trunk-jpl/src/c/classes/classes.h
r14633 r14734 28 28 #include "./Update.h" 29 29 #include "./FemModel.h" 30 #include "./GiaDeflectionCoreArgs.h" 30 31 #include "./OptArgs.h" 31 32 #include "./OptPars.h" -
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
r14704 r14734 3057 3057 IssmDouble currenttime; 3058 3058 int numtimes; 3059 Input* thickness_input=NULL; 3060 3061 /*gia material parameters: */ 3062 IssmDouble lithosphere_shear_modulus; 3063 IssmDouble lithosphere_density; 3064 IssmDouble mantle_shear_modulus; 3065 IssmDouble mantle_viscosity; 3066 IssmDouble mantle_density; 3067 Input* lithosphere_thickness_input=NULL; 3068 IssmDouble lithosphere_thickness; 3069 3070 /*ice properties: */ 3071 IssmDouble rho_ice; 3059 3072 3060 3073 /*output: */ 3061 3074 IssmDouble wi; 3062 3075 3076 /*arguments to GiaDeflectionCorex: */ 3077 GiaDeflectionCoreArgs arguments; 3078 3063 3079 /*how many dofs are we working with here? */ 3064 3080 this->parameters->FindParam(&gsize,MeshNumberofverticesEnum); 3065 3081 3066 3082 /*what time is it? :*/ 3067 3083 this->parameters->FindParam(¤ttime,TimeEnum); 3068 3084 3085 /*recover material parameters: */ 3086 lithosphere_shear_modulus=matpar->GetLithosphereShearModulus(); 3087 lithosphere_density=matpar->GetLithosphereDensity(); 3088 mantle_shear_modulus=matpar->GetMantleShearModulus(); 3089 mantle_viscosity=matpar->GetMantleViscosity(); 3090 mantle_density=matpar->GetMantleDensity(); 3091 rho_ice=matpar->GetRhoIce(); 3092 3069 3093 /*pull thickness averages: */ 3070 Input*thickness_input=inputs->GetInput(ThicknessEnum);3094 thickness_input=inputs->GetInput(ThicknessEnum); 3071 3095 if (!thickness_input)_error_("thickness input needed to compute gia deflection!"); 3072 3096 thickness_input->GetInputAllTimeAverages(&hes,×,&numtimes); 3073 3097 3098 /*recover lithosphere thickness: */ 3099 lithosphere_thickness_input=inputs->GetInput(GiaLithosphereThicknessEnum); 3100 if (!lithosphere_thickness_input)_error_("lithosphere thickness input needed to compute gia deflection!"); 3101 lithosphere_thickness_input->GetInputAverage(&lithosphere_thickness); 3102 3074 3103 /*pull area of this Tria: */ 3075 3104 area=this->GetArea(); … … 3083 3112 y0=(xyz_list[0][1]+xyz_list[1][1]+xyz_list[2][1])/3.0; 3084 3113 3114 /*start loading GiaDeflectionCore arguments: */ 3115 arguments.re=re; 3116 arguments.hes=hes; 3117 arguments.times=times; 3118 arguments.numtimes=numtimes; 3119 arguments.currenttime=currenttime; 3120 arguments.lithosphere_shear_modulus=lithosphere_shear_modulus; 3121 arguments.lithosphere_density=lithosphere_density; 3122 arguments.mantle_shear_modulus=mantle_shear_modulus; 3123 arguments.mantle_viscosity=mantle_viscosity; 3124 arguments.mantle_density=mantle_density; 3125 arguments.lithosphere_thickness=lithosphere_thickness; 3126 arguments.rho_ice=rho_ice; 3127 3085 3128 for(i=0;i<gsize;i++){ 3086 3129 /*compute distance from the center of the tria to the vertex i: */ 3087 3130 xi=x[i]; yi=y[i]; 3088 3131 ri=sqrt(pow(xi-x0,2)+pow(yi-y0,2)); 3132 3133 /*load ri onto arguments for this vertex i: */ 3134 arguments.ri=ri; 3089 3135 3090 3136 /*for this Tria, compute contribution to rebound at vertex i: */ 3091 GiaDeflectionCorex(&wi, ri,re,hes,times,currenttime,numtimes);3137 GiaDeflectionCorex(&wi,&arguments); 3092 3138 3093 3139 /*plug value into solution vector: */ 3094 3140 wg->SetValue(i,wi,ADD_VAL); 3141 3095 3142 } 3096 3143 -
issm/trunk-jpl/src/c/classes/objects/Materials/Matpar.cpp
r14695 r14734 60 60 _error_("Hydrology model "<<EnumToStringx(hydrology_model)<<" not supported yet"); 61 61 } 62 62 63 /*gia: */ 64 iomodel->Constant(&this->lithosphere_shear_modulus,MaterialsLithosphereShearModulusEnum); 65 iomodel->Constant(&this->lithosphere_density,MaterialsLithosphereDensityEnum); 66 iomodel->Constant(&this->mantle_shear_modulus,MaterialsMantleShearModulusEnum); 67 iomodel->Constant(&this->mantle_viscosity,MaterialsMantleViscosityEnum); 68 iomodel->Constant(&this->mantle_density,MaterialsMantleDensityEnum); 69 70 /*Unit conversion: */ 71 this->UnitConversion(); 63 72 64 73 this->inputs=NULL; /*not used here*/ … … 383 392 } 384 393 /*}}}*/ 394 395 /*FUNCTION Matpar::GetLithosphereShearModulus {{{*/ 396 IssmDouble Matpar::GetLithosphereShearModulus(){ 397 return lithosphere_shear_modulus; 398 } 399 /*}}}*/ 400 /*FUNCTION Matpar::GetLithosphereDensity {{{*/ 401 IssmDouble Matpar::GetLithosphereDensity(){ 402 return lithosphere_density; 403 } 404 /*}}}*/ 405 /*FUNCTION Matpar::GetMantleDensity {{{*/ 406 IssmDouble Matpar::GetMantleDensity(){ 407 return mantle_density; 408 } 409 /*}}}*/ 410 /*FUNCTION Matpar::GetMantleShearModulus {{{*/ 411 IssmDouble Matpar::GetMantleShearModulus(){ 412 return mantle_shear_modulus; 413 } 414 /*}}}*/ 415 /*FUNCTION Matpar::GetMantleViscosity {{{*/ 416 IssmDouble Matpar::GetMantleViscosity(){ 417 return mantle_viscosity; 418 } 419 /*}}}*/ 420 /*FUNCTION Matpar::UnitConversion {{{*/ 421 void Matpar::UnitConversion(void){ 422 423 /*convert units of fields that were allocated using the Ext unit system, into the Iu unit system: */ 424 ::UnitConversion(&this->lithosphere_density,1,ExtToIuEnum,MaterialsLithosphereDensityEnum); 425 ::UnitConversion(&this->mantle_density,1,ExtToIuEnum,MaterialsMantleDensityEnum); 426 427 } 428 /*}}}*/ 429 -
issm/trunk-jpl/src/c/classes/objects/Materials/Matpar.h
r14695 r14734 43 43 IssmDouble sediment_transmitivity; 44 44 IssmDouble water_compressibility; 45 46 /*gia: */ 47 IssmDouble lithosphere_shear_modulus; 48 IssmDouble lithosphere_density; 49 IssmDouble mantle_shear_modulus; 50 IssmDouble mantle_viscosity; 51 IssmDouble mantle_density; 52 53 45 54 public: 46 55 Matpar(); … … 111 120 IssmDouble PureIceEnthalpy(IssmDouble pressure); 112 121 IssmDouble GetEnthalpyDiffusionParameter(IssmDouble enthalpy,IssmDouble pressure); 122 IssmDouble GetLithosphereShearModulus(); 123 IssmDouble GetLithosphereDensity(); 124 IssmDouble GetMantleShearModulus(); 125 IssmDouble GetMantleViscosity(); 126 IssmDouble GetMantleDensity(); 113 127 void EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure); 114 128 void ThermalToEnthalpy(IssmDouble* penthalpy,IssmDouble temperature,IssmDouble waterfraction,IssmDouble pressure); 129 void UnitConversion(void); 115 130 /*}}}*/ 116 131 -
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp
r14650 r14734 7 7 #include "./GiaDeflectionCorex.h" 8 8 9 #include "../../classes/classes.h" 9 10 #include "../../shared/shared.h" 10 11 #include "../../include/include.h" … … 13 14 #include "../InputUpdateFromConstantx/InputUpdateFromConstantx.h" 14 15 15 void GiaDeflectionCorex( IssmDouble* pwi, IssmDouble ri, IssmDouble re, IssmDouble* hes, IssmDouble* times, IssmDouble currentime,int numtimes){16 void GiaDeflectionCorex( IssmDouble* pwi, GiaDeflectionCoreArgs* arguments){ 16 17 17 18 /*output: */ 18 19 IssmDouble wi=1; 19 20 21 /*inputs: {{{*/ 22 IssmDouble ri; //radial distance from center of disk to vertex i 23 IssmDouble re; //radius of disk 24 IssmDouble* hes; //loading history (in ice thickness) 25 IssmDouble* times; //loading history times 26 int numtimes; //loading history length 27 IssmDouble currenttime; 28 29 /*gia material parameters: */ 30 IssmDouble lithosphere_shear_modulus; 31 IssmDouble lithosphere_density; 32 IssmDouble mantle_shear_modulus; 33 IssmDouble mantle_viscosity; 34 IssmDouble mantle_density; 35 IssmDouble lithosphere_thickness; 36 37 /*ice properties: */ 38 IssmDouble rho_ice; 39 /*}}}*/ 40 /*Recover material parameters and loading history: see GiaDeflectionCoreArgs for more details {{{*/ 41 ri=arguments->ri; 42 re=arguments->re; 43 hes=arguments->hes; 44 times=arguments->times; 45 numtimes=arguments->numtimes; 46 currenttime=arguments->currenttime; 47 lithosphere_shear_modulus=arguments->lithosphere_shear_modulus; 48 lithosphere_density=arguments->lithosphere_density; 49 mantle_shear_modulus=arguments->mantle_shear_modulus; 50 mantle_viscosity=arguments->mantle_viscosity; 51 mantle_density=arguments->mantle_density; 52 lithosphere_thickness=arguments->lithosphere_thickness; 53 rho_ice=arguments->rho_ice; 54 /*}}}*/ 55 56 57 20 58 /*allocate output pointer: */ 21 59 *pwi=wi; -
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.h
r14650 r14734 6 6 #define _GIADEFLECTIONCOREX_H 7 7 8 #include "../../classes/ objects/objects.h"8 #include "../../classes/classes.h" 9 9 #include "../../Container/Container.h" 10 10 11 11 /* local prototypes: */ 12 void GiaDeflectionCorex( IssmDouble* pwi, IssmDouble ri, IssmDouble re, IssmDouble* hes, IssmDouble* times, IssmDouble currentime,int numtimes);12 void GiaDeflectionCorex( IssmDouble* pwi, GiaDeflectionCoreArgs* arguments); 13 13 14 14 #endif /* _GIADEFLECTIONCOREX_H */ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/Gia/UpdateElementsGia.cpp
r14650 r14734 22 22 iomodel->Constant(&dim,MeshDimensionEnum); 23 23 iomodel->Constant(&numberofelements,MeshNumberofelementsEnum); 24 iomodel->FetchData( 1,MeshElementsEnum);24 iomodel->FetchData(2,MeshElementsEnum,GiaLithosphereThicknessEnum); 25 25 26 26 /*Update elements: */ … … 35 35 36 36 iomodel->FetchDataToInput(elements,ThicknessEnum); 37 iomodel->FetchDataToInput(elements,GiaLithosphereThicknessEnum); 37 38 38 39 /*Free data: */ 39 iomodel->DeleteData( 1,MeshElementsEnum);40 iomodel->DeleteData(2,MeshElementsEnum,GiaLithosphereThicknessEnum); 40 41 } -
issm/trunk-jpl/src/m/classes/matdamageice.m
r13347 r14734 21 21 rheology_Z = NaN; 22 22 rheology_law = ''; 23 24 %gia: 25 lithosphere_shear_modulus = 0.; 26 lithosphere_density = 0.; 27 mantle_shear_modulus = 0.; 28 mantle_viscosity = 0.; 29 mantle_density = 0.; 30 31 23 32 end 24 33 methods … … 79 88 %available: none, paterson and arrhenius 80 89 obj.rheology_law='Paterson'; 90 91 %GIA: 92 obj.lithosphere_shear_modulus = 6.7*10^10; %(Pa) 93 obj.lithosphere_density = 3.32; %(g/cm^-3) 94 obj.mantle_shear_modulus = 1.45*10^11; %(Pa) 95 obj.mantle_viscosity = 10^21; %(Pa.s) 96 obj.mantle_density = 3.34; %(g/cm^-3) 97 81 98 end % }}} 82 99 function md = checkconsistency(obj,md,solution,analyses) % {{{ … … 89 106 md = checkfield(md,'materials.rheology_Z','>',0,'size',[md.mesh.numberofvertices 1]); 90 107 md = checkfield(md,'materials.rheology_law','values',{'None' 'Paterson' 'Arrhenius'}); 108 md = checkfield(md,'materials.lithosphere_shear_modulus','>',0); 109 md = checkfield(md,'materials.lithosphere_density','>',0); 110 md = checkfield(md,'materials.mantle_shear_modulus','>',0); 111 md = checkfield(md,'materials.mantle_viscosity','>',0); 112 md = checkfield(md,'materials.mantle_density','>',0); 113 91 114 end % }}} 92 115 function disp(obj) % {{{ … … 108 131 fielddisplay(obj,'rheology_Z','rheology multiplier'); 109 132 fielddisplay(obj,'rheology_law','law for the temperature dependance of the rheology: ''None'', ''Paterson'' or ''Arrhenius'''); 133 fielddisplay(obj,'lithosphere_shear_modulus','Lithosphere shear modulus [Pa]'); 134 fielddisplay(obj,'lithosphere_density','Lithosphere density [g/cm^-3]'); 135 fielddisplay(obj,'mantle_shear_modulus','Mantle shear modulus [Pa]'); 136 fielddisplay(obj,'mantle_viscosity','Mantle viscosity [Pa.s]'); 137 fielddisplay(obj,'mantle_density','Mantle density [g/cm^-3]'); 138 110 139 end % }}} 111 140 function marshall(obj,fid) % {{{ … … 126 155 WriteData(fid,'object',obj,'class','materials','fieldname','rheology_Z','format','DoubleMat','mattype',1); 127 156 WriteData(fid,'data',StringToEnum(obj.rheology_law),'enum',MaterialsRheologyLawEnum(),'format','Integer'); 157 158 WriteData(fid,'object',obj,'class','materials','fieldname','lithosphere_shear_modulus','format','Double'); 159 WriteData(fid,'object',obj,'class','materials','fieldname','lithosphere_density','format','Double'); 160 WriteData(fid,'object',obj,'class','materials','fieldname','mantle_shear_modulus','format','Double'); 161 WriteData(fid,'object',obj,'class','materials','fieldname','mantle_viscosity','format','Double'); 162 WriteData(fid,'object',obj,'class','materials','fieldname','mantle_density','format','Double'); 163 128 164 end % }}} 129 165 end -
issm/trunk-jpl/test/NightlyRun/test330.m
r14650 r14734 4 4 md=parameterize(md,'../Par/SquareSheetConstrained.par'); 5 5 md=setflowequation(md,'macayeal','all'); 6 md.cluster=generic('name',oshostname(),'np', 3);7 %md.verbose=verbose('convergence',true,'solution',true,'module',true,'solver',true,'mprocessor',true);6 md.cluster=generic('name',oshostname(),'np',8); 7 md.verbose=verbose('1111111'); 8 8 md=solve(md,GiaSolutionEnum()); 9 9
Note:
See TracChangeset
for help on using the changeset viewer.