Changeset 26052
- Timestamp:
- 03/08/21 19:45:54 (4 years ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.h
r26047 r26052 366 366 virtual void WriteFieldIsovalueSegment(DataSet* segments,int fieldenum,IssmDouble fieldvalue){_error_("not implemented yet");}; 367 367 368 #ifdef _HAVE_GIA_369 virtual void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y)=0;370 #endif371 368 #ifdef _HAVE_ESA_ 372 369 virtual void EsaGeodetic2D(Vector<IssmDouble>* pUp,Vector<IssmDouble>* pNorth,Vector<IssmDouble>* pEast, Vector<IssmDouble>* pX, Vector<IssmDouble>* pY,IssmDouble* xx,IssmDouble* yy)=0; … … 385 382 virtual void SealevelchangeSal(IssmDouble* Sgo, IssmDouble* Sg_old,SealevelMasks* mask)=0; 386 383 virtual void DeformationFromSurfaceLoads(IssmDouble* Up, IssmDouble* North, IssmDouble* East, IssmDouble* Sg,SealevelMasks* masks)=0; 384 virtual void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y)=0; 387 385 #endif 388 386 -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r26047 r26052 207 207 #endif 208 208 209 #ifdef _HAVE_GIA_210 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y){_error_("not implemented yet");};211 #endif212 209 #ifdef _HAVE_ESA_ 213 210 void EsaGeodetic2D(Vector<IssmDouble>* pUp,Vector<IssmDouble>* pNorth,Vector<IssmDouble>* pEast,Vector<IssmDouble>* pX,Vector<IssmDouble>* pY,IssmDouble* xx,IssmDouble* yy){_error_("not implemented yet!");}; … … 224 221 void SealevelchangeSal(IssmDouble* Sgo, IssmDouble* Sg_old, SealevelMasks* masks){_error_("not implemented yet!");}; 225 222 void DeformationFromSurfaceLoads(IssmDouble* Up, IssmDouble* North, IssmDouble* East, IssmDouble* Sg, SealevelMasks* masks){_error_("not implemented yet!");}; 223 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y){_error_("not implemented yet");}; 226 224 #endif 227 225 -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r26047 r26052 163 163 IssmDouble GetAreaSpherical(void){_error_("not implemented yet!");}; 164 164 165 #ifdef _HAVE_GIA_166 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y){_error_("not implemented yet");};167 #endif168 165 #ifdef _HAVE_ESA_ 169 166 void EsaGeodetic2D(Vector<IssmDouble>* pUp,Vector<IssmDouble>* pNorth,Vector<IssmDouble>* pEast,Vector<IssmDouble>* pX,Vector<IssmDouble>* pY,IssmDouble* xx,IssmDouble* yy){_error_("not implemented yet!");}; … … 180 177 void DeformationFromSurfaceLoads(IssmDouble* Up, IssmDouble* North, IssmDouble* East, IssmDouble* Sg, SealevelMasks* masks){_error_("not implemented yet!");}; 181 178 IssmDouble OceanAverage(IssmDouble* Sg, SealevelMasks* masks){_error_("not implemented yet!");}; 179 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y){_error_("not implemented yet");}; 182 180 #endif 183 181 -
issm/trunk-jpl/src/c/classes/Elements/Tetra.h
r26047 r26052 169 169 void ViscousHeating(IssmDouble* pphi,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input); 170 170 171 #ifdef _HAVE_GIA_172 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, Matlitho* litho, IssmDouble* x,IssmDouble* y){_error_("not implemented yet");};173 #endif174 171 #ifdef _HAVE_ESA_ 175 172 void EsaGeodetic2D(Vector<IssmDouble>* pUp,Vector<IssmDouble>* pNorth,Vector<IssmDouble>* pEast,Vector<IssmDouble>* pX,Vector<IssmDouble>* pY,IssmDouble* xx,IssmDouble* yy){_error_("not implemented yet!");}; … … 186 183 void DeformationFromSurfaceLoads(IssmDouble* Up ,IssmDouble* North, IssmDouble* East, IssmDouble* Sg, SealevelMasks* masks){_error_("not implemented yet!");}; 187 184 IssmDouble OceanAverage(IssmDouble* Sg, SealevelMasks* masks){_error_("not implemented yet!");}; 185 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, Matlitho* litho, IssmDouble* x,IssmDouble* y){_error_("not implemented yet");}; 188 186 #endif 189 187 -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r26047 r26052 5088 5088 /*}}}*/ 5089 5089 5090 #ifdef _HAVE_GIA_5091 void Tria::GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, Matlitho* litho, IssmDouble* x, IssmDouble* y){/*{{{*/5092 5093 IssmDouble xyz_list[NUMVERTICES][3];5094 5095 /*gia solution parameters:*/5096 IssmDouble ice_mask;5097 5098 /*output: */5099 IssmDouble wi;5100 IssmDouble dwidt;5101 5102 /*arguments to GiaDeflectionCorex: */5103 GiaDeflectionCoreArgs arguments;5104 5105 /*how many dofs are we working with here? */5106 int gsize;5107 IssmDouble yts;5108 this->parameters->FindParam(&gsize,MeshNumberofverticesEnum);5109 this->parameters->FindParam(&yts,ConstantsYtsEnum);5110 5111 /*recover gia solution parameters: */5112 int cross_section_shape;5113 this->parameters->FindParam(&cross_section_shape,SolidearthSettingsCrossSectionShapeEnum);5114 5115 /*what time is it? :*/5116 IssmDouble currenttime;5117 this->parameters->FindParam(¤ttime,TimeEnum);5118 5119 /*recover material parameters: */5120 IssmDouble rho_ice = FindParam(MaterialsRhoIceEnum);5121 5122 /*recover mantle and lithosphere material properties:*/5123 int numlayers=litho->numlayers;5124 5125 /*lithosphere is the last layer, mantle is the penultimate layer. Watch out, radius represents the layers5126 *from center to surface of the Earth:*/5127 IssmDouble lithosphere_thickness = litho->radius[numlayers] - litho->radius[numlayers-1];5128 IssmDouble lithosphere_shear_modulus = litho->lame_mu[numlayers-1];5129 IssmDouble lithosphere_density = litho->density[numlayers-1];5130 IssmDouble mantle_shear_modulus = litho->lame_mu[numlayers-2];5131 IssmDouble mantle_density = litho->density[numlayers-2];5132 IssmDouble mantle_viscosity = litho->viscosity[numlayers-2];5133 5134 /*early return if we are NOT on an icy element:*/5135 if(!IsIceInElement()) return;5136 5137 /*pull thickness averages! */5138 IssmDouble *hes = NULL;5139 IssmDouble *times = NULL;5140 int numtimes;5141 this->GetInputAveragesUpToCurrentTime(TransientAccumulatedDeltaIceThicknessEnum,&hes,×,&numtimes,currenttime);5142 5143 if(this->Id()==1){5144 _printf_("numtimes: " << numtimes << "\n");5145 for (int i=0;i<numtimes;i++)_printf_(times[i] << " " << hes[i] << "\n");5146 }5147 5148 /*pull area of this Tria: */5149 IssmDouble area=this->GetArea();5150 5151 /*element radius: */5152 IssmDouble re=sqrt(area/PI);5153 5154 /*figure out gravity center of our element: */5155 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);5156 IssmDouble x0=(xyz_list[0][0]+xyz_list[1][0]+xyz_list[2][0])/3.0;5157 IssmDouble y0=(xyz_list[0][1]+xyz_list[1][1]+xyz_list[2][1])/3.0;5158 5159 /*start loading GiaDeflectionCore arguments: */5160 arguments.re=re;5161 arguments.hes=hes;5162 arguments.times=times;5163 arguments.numtimes=numtimes;5164 arguments.currenttime=currenttime;5165 arguments.lithosphere_shear_modulus=lithosphere_shear_modulus;5166 arguments.lithosphere_density=lithosphere_density;5167 arguments.mantle_shear_modulus=mantle_shear_modulus;5168 arguments.mantle_viscosity=mantle_viscosity;5169 arguments.mantle_density=mantle_density;5170 arguments.lithosphere_thickness=lithosphere_thickness;5171 arguments.rho_ice=rho_ice;5172 arguments.idisk=this->id;5173 arguments.iedge=cross_section_shape;5174 arguments.yts=yts;5175 5176 for(int i=0;i<gsize;i++){5177 /*compute distance from the center of the tria to the vertex i: */5178 IssmDouble xi=x[i];5179 IssmDouble yi=y[i];5180 IssmDouble ri=sqrt(pow(xi-x0,2)+pow(yi-y0,2));5181 5182 /*load ri onto arguments for this vertex i: */5183 arguments.ri=ri;5184 5185 /*for this Tria, compute contribution to rebound at vertex i: */5186 GiaDeflectionCorex(&wi,&dwidt,&arguments);5187 5188 /*plug value into solution vector: */5189 wg->SetValue(i,wi,ADD_VAL);5190 dwgdt->SetValue(i,dwidt,ADD_VAL);5191 }5192 5193 /*Free ressources: */5194 xDelete<IssmDouble>(hes);5195 xDelete<IssmDouble>(times);5196 5197 return;5198 }5199 /*}}}*/5200 #endif5201 5090 #ifdef _HAVE_ESA_ 5202 5091 void Tria::EsaGeodetic2D(Vector<IssmDouble>* pUp,Vector<IssmDouble>* pNorth,Vector<IssmDouble>* pEast,Vector<IssmDouble>* pX,Vector<IssmDouble>* pY,IssmDouble* xx,IssmDouble* yy){ /*{{{*/ … … 6195 6084 } 6196 6085 /*}}}*/ 6086 void Tria::GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt, Matlitho* litho, IssmDouble* x, IssmDouble* y){/*{{{*/ 6087 6088 IssmDouble xyz_list[NUMVERTICES][3]; 6089 6090 /*gia solution parameters:*/ 6091 IssmDouble ice_mask; 6092 6093 /*output: */ 6094 IssmDouble wi; 6095 IssmDouble dwidt; 6096 6097 /*arguments to GiaDeflectionCorex: */ 6098 GiaDeflectionCoreArgs arguments; 6099 6100 /*how many dofs are we working with here? */ 6101 int gsize; 6102 IssmDouble yts; 6103 this->parameters->FindParam(&gsize,MeshNumberofverticesEnum); 6104 this->parameters->FindParam(&yts,ConstantsYtsEnum); 6105 6106 /*recover gia solution parameters: */ 6107 int cross_section_shape; 6108 this->parameters->FindParam(&cross_section_shape,SolidearthSettingsCrossSectionShapeEnum); 6109 6110 /*what time is it? :*/ 6111 IssmDouble currenttime; 6112 this->parameters->FindParam(¤ttime,TimeEnum); 6113 6114 /*recover material parameters: */ 6115 IssmDouble rho_ice = FindParam(MaterialsRhoIceEnum); 6116 6117 /*recover mantle and lithosphere material properties:*/ 6118 int numlayers=litho->numlayers; 6119 6120 /*lithosphere is the last layer, mantle is the penultimate layer. Watch out, radius represents the layers 6121 *from center to surface of the Earth:*/ 6122 IssmDouble lithosphere_thickness = litho->radius[numlayers] - litho->radius[numlayers-1]; 6123 IssmDouble lithosphere_shear_modulus = litho->lame_mu[numlayers-1]; 6124 IssmDouble lithosphere_density = litho->density[numlayers-1]; 6125 IssmDouble mantle_shear_modulus = litho->lame_mu[numlayers-2]; 6126 IssmDouble mantle_density = litho->density[numlayers-2]; 6127 IssmDouble mantle_viscosity = litho->viscosity[numlayers-2]; 6128 6129 /*early return if we are NOT on an icy element:*/ 6130 if(!IsIceInElement()) return; 6131 6132 /*pull thickness averages! */ 6133 IssmDouble *hes = NULL; 6134 IssmDouble *times = NULL; 6135 int numtimes; 6136 this->GetInputAveragesUpToCurrentTime(TransientAccumulatedDeltaIceThicknessEnum,&hes,×,&numtimes,currenttime); 6137 6138 if(this->Id()==1){ 6139 _printf_("numtimes: " << numtimes << "\n"); 6140 for (int i=0;i<numtimes;i++)_printf_(times[i] << " " << hes[i] << "\n"); 6141 } 6142 6143 /*pull area of this Tria: */ 6144 IssmDouble area=this->GetArea(); 6145 6146 /*element radius: */ 6147 IssmDouble re=sqrt(area/PI); 6148 6149 /*figure out gravity center of our element: */ 6150 ::GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES); 6151 IssmDouble x0=(xyz_list[0][0]+xyz_list[1][0]+xyz_list[2][0])/3.0; 6152 IssmDouble y0=(xyz_list[0][1]+xyz_list[1][1]+xyz_list[2][1])/3.0; 6153 6154 /*start loading GiaDeflectionCore arguments: */ 6155 arguments.re=re; 6156 arguments.hes=hes; 6157 arguments.times=times; 6158 arguments.numtimes=numtimes; 6159 arguments.currenttime=currenttime; 6160 arguments.lithosphere_shear_modulus=lithosphere_shear_modulus; 6161 arguments.lithosphere_density=lithosphere_density; 6162 arguments.mantle_shear_modulus=mantle_shear_modulus; 6163 arguments.mantle_viscosity=mantle_viscosity; 6164 arguments.mantle_density=mantle_density; 6165 arguments.lithosphere_thickness=lithosphere_thickness; 6166 arguments.rho_ice=rho_ice; 6167 arguments.idisk=this->id; 6168 arguments.iedge=cross_section_shape; 6169 arguments.yts=yts; 6170 6171 for(int i=0;i<gsize;i++){ 6172 /*compute distance from the center of the tria to the vertex i: */ 6173 IssmDouble xi=x[i]; 6174 IssmDouble yi=y[i]; 6175 IssmDouble ri=sqrt(pow(xi-x0,2)+pow(yi-y0,2)); 6176 6177 /*load ri onto arguments for this vertex i: */ 6178 arguments.ri=ri; 6179 6180 /*for this Tria, compute contribution to rebound at vertex i: */ 6181 GiaDeflectionCorex(&wi,&dwidt,&arguments); 6182 6183 /*plug value into solution vector: */ 6184 wg->SetValue(i,wi,ADD_VAL); 6185 dwgdt->SetValue(i,dwidt,ADD_VAL); 6186 } 6187 6188 /*Free ressources: */ 6189 xDelete<IssmDouble>(hes); 6190 xDelete<IssmDouble>(times); 6191 6192 return; 6193 } 6194 /*}}}*/ 6197 6195 #endif 6198 6196 -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r26047 r26052 154 154 void WriteFieldIsovalueSegment(DataSet* segments,int fieldenum,IssmDouble fieldvalue); 155 155 156 #ifdef _HAVE_GIA_157 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y);158 #endif159 156 #ifdef _HAVE_ESA_ 160 157 void EsaGeodetic2D(Vector<IssmDouble>* pUp,Vector<IssmDouble>* pNorth,Vector<IssmDouble>* pEast, Vector<IssmDouble>* pX,Vector<IssmDouble>* pY,IssmDouble* xx,IssmDouble* yy); … … 171 168 void SealevelchangeSal(IssmDouble* Sgo,IssmDouble* Sg_old,SealevelMasks* masks); 172 169 void DeformationFromSurfaceLoads(IssmDouble* Up, IssmDouble* North, IssmDouble* East, IssmDouble* Sg,SealevelMasks* masks); 170 void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,Matlitho* litho, IssmDouble* x,IssmDouble* y); 173 171 #endif 174 172 /*}}}*/ -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r26050 r26052 981 981 if(profiler->Used(SMBCORE)) _printf0_(" "<<setw(40)<<left<<"SMB core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(SMBCORE) << " sec\n"); 982 982 if(profiler->Used(GROUNDINGLINECORE)) _printf0_(" "<<setw(40)<<left<<"Groundingline migration core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(GROUNDINGLINECORE) << " sec\n"); 983 if(profiler->Used(GIACORE)) _printf0_(" "<<setw(40)<<left<<"GIA core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(GIACORE) << " sec\n");984 983 if(profiler->Used(ESACORE)) _printf0_(" "<<setw(40)<<left<<"ESA core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(ESACORE) << " sec\n"); 985 984 if(profiler->Used(SLRCORE)) _printf0_(" "<<setw(40)<<left<<"SLR core elapsed time:"<<setw(7)<<setprecision(6)<<profiler->TotalTime(SLRCORE) << " sec\n"); -
issm/trunk-jpl/src/c/classes/Profiler.h
r26047 r26052 25 25 #define SMBCORE 12 /*Profiling SMB */ 26 26 #define GROUNDINGLINECORE 13 /*Profiling GROUDINGLINE MIGRATION */ 27 #define GIACORE 14 /*Profiling GIA */ 28 #define ESACORE 15 /*Profiling ESA */ 29 #define SLRCORE 16 /*Profiling SLR */ 30 #define SAMPLINGCORE 17 /*Profiling SAMPLING */ 31 #define MPISERIAL 18 /*Profiling MPISerial */ 32 #define SEDLOOP 19 /*Profiling MPISerial */ 33 #define SEDMatrix 20 /*Profiling MPISerial */ 34 #define SEDUpdate 21 /*Profiling MPISerial */ 35 #define EPLLOOP 22 /*Profiling MPISerial */ 36 #define EPLMasking 23 /*Profiling MPISerial */ 37 #define EPLMatrices 24 /*Profiling MPISerial */ 38 #define EPLUpdate 25 /*Profiling MPISerial */ 39 #define MAXPROFSIZE 26 /*Used to initialize static arrays*/ 27 #define ESACORE 14 /*Profiling ESA */ 28 #define SLRCORE 15 /*Profiling SLR */ 29 #define SAMPLINGCORE 16 /*Profiling SAMPLING */ 30 #define MPISERIAL 17 /*Profiling MPISerial */ 31 #define SEDLOOP 18 /*Profiling MPISerial */ 32 #define SEDMatrix 19 /*Profiling MPISerial */ 33 #define SEDUpdate 20 /*Profiling MPISerial */ 34 #define EPLLOOP 21 /*Profiling MPISerial */ 35 #define EPLMasking 22 /*Profiling MPISerial */ 36 #define EPLMatrices 23 /*Profiling MPISerial */ 37 #define EPLUpdate 24 /*Profiling MPISerial */ 38 #define MAXPROFSIZE 25 /*Used to initialize static arrays*/ 40 39 41 40
Note:
See TracChangeset
for help on using the changeset viewer.