Changeset 16697
- Timestamp:
- 11/09/13 20:46:41 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp
r16693 r16697 978 978 /*Ok, we have vx and vy in values, fill in vx and vy arrays: */ 979 979 for(i=0;i<numnodes;i++){ 980 vx[i]=values[i* NDOF2+0];981 vy[i]=values[i* NDOF2+1];980 vx[i]=values[i*2+0]; 981 vy[i]=values[i*2+1]; 982 982 983 983 /*Check solution*/ … … 992 992 /*For pressure: we have not computed pressure in this analysis, for this element. We are in 2D, 993 993 *so the pressure is just the pressure at the bedrock: */ 994 Matpar* matpar=element->GetMatparPointer(); 995 rho_ice=matpar->GetRhoIce(); 996 g=matpar->GetG(); 994 rho_ice = element->GetMaterialParameter(MaterialsRhoIceEnum); 995 g = element->GetMaterialParameter(ConstantsGEnum); 997 996 element->GetInputListOnNodes(&thickness[0],ThicknessEnum); 998 997 for(i=0;i<numnodes;i++) pressure[i]=rho_ice*g*thickness[i]; -
issm/trunk-jpl/src/c/classes/Elements/Element.h
r16693 r16697 47 47 virtual void FindParam(IssmDouble* pvalue,int paramenum)=0; 48 48 virtual int FiniteElement(void)=0; 49 virtual Matpar* GetMatparPointer(void)=0;49 virtual IssmDouble GetMaterialParameter(int enum_in)=0; 50 50 virtual void TransformSolutionCoord(IssmDouble* values,int transformenum)=0; 51 51 virtual void GetDofList(int** pdoflist,int approximation_enum,int setenum)=0; -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r16694 r16697 1074 1074 /*Assign output pointers:*/ 1075 1075 *pdoflist=doflist; 1076 } 1077 /*}}}*/ 1078 /*FUNCTION Penta::GetMaterialParameter{{{*/ 1079 IssmDouble Penta::GetMaterialParameter(int enum_in){ 1080 1081 _assert_(this->matpar); 1082 return this->matpar->GetMaterialParameter(enum_in); 1076 1083 } 1077 1084 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r16693 r16697 91 91 void GetNodesLidList(int* lidlist); 92 92 int GetNumberOfNodes(void); 93 Matpar* GetMatparPointer(void){_error_("not implemented yet");};93 IssmDouble GetMaterialParameter(int enum_in); 94 94 void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type); 95 95 IssmDouble GetZcoord(GaussPenta* gauss); -
issm/trunk-jpl/src/c/classes/Elements/Seg.cpp
r16675 r16697 146 146 /*}}}*/ 147 147 148 /*FUNCTION Seg::GetMaterialParameter{{{*/ 149 IssmDouble Seg::GetMaterialParameter(int enum_in){ 150 151 _assert_(this->matpar); 152 return this->matpar->GetMaterialParameter(enum_in); 153 } 154 /*}}}*/ 148 155 /*FUNCTION Seg::GetSize{{{*/ 149 156 IssmDouble Seg::GetSize(void){ -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r16693 r16697 87 87 void GetInputListOnNodes(IssmDouble* pvalue,int enumtype){_error_("not implemented yet");}; 88 88 void GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue){_error_("not implemented yet");}; 89 Matpar* GetMatparPointer(void){_error_("not implemented yet");};89 IssmDouble GetMaterialParameter(int enum_in); 90 90 int GetNodeIndex(Node* node){_error_("not implemented yet");}; 91 91 void GetNodesSidList(int* sidlist){_error_("not implemented yet");}; -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r16694 r16697 1189 1189 } 1190 1190 /*}}}*/ 1191 /*FUNCTION Tria::GetMaterialParameter{{{*/ 1192 IssmDouble Tria::GetMaterialParameter(int enum_in){ 1193 1194 _assert_(this->matpar); 1195 return this->matpar->GetMaterialParameter(enum_in); 1196 } 1197 /*}}}*/ 1191 1198 /*FUNCTION Tria::GetSegmentNormal {{{*/ 1192 1199 void Tria:: GetSegmentNormal(IssmDouble* normal,IssmDouble xyz_list[2][3]){ … … 1495 1502 input->GetInputValue(pvalue,gauss); 1496 1503 delete gauss; 1497 }1498 /*}}}*/1499 /*FUNCTION Tria::GetMatparPointer(void) {{{*/1500 Matpar* Tria::GetMatparPointer(void){1501 return this->matpar;1502 1504 } 1503 1505 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r16693 r16697 238 238 IssmDouble GetGroundedPortion(IssmDouble* xyz_list); 239 239 void GetSegmentNormal(IssmDouble* normal,IssmDouble xyz_list[2][3]); 240 Matpar* GetMatparPointer(void);240 IssmDouble GetMaterialParameter(int enum_in); 241 241 void GetZeroLevelsetCoordinates(IssmDouble* xyz_zero,IssmDouble xyz_list[3][3],int levelsetenum); 242 242 Input* GetInput(int inputenum); -
issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp
r16638 r16697 241 241 } 242 242 /*}}}*/ 243 /*FUNCTION Matpar::Configure {{{*/ 244 IssmDouble Matpar::GetMaterialParameter(int enum_in){ 245 246 switch(enum_in){ 247 case MaterialsRhoIceEnum: return this->rho_ice; 248 case MaterialsRhoWaterEnum: return this->rho_water; 249 case MaterialsRhoFreshwaterEnum: return this->rho_freshwater; 250 case MaterialsMuWaterEnum: return this->mu_water; 251 case MaterialsHeatcapacityEnum: return this->heatcapacity; 252 case MaterialsThermalconductivityEnum: return this->thermalconductivity; 253 case MaterialsTemperateiceconductivityEnum: return this->temperateiceconductivity; 254 case MaterialsLatentheatEnum: return this->latentheat; 255 case MaterialsBetaEnum: return this->beta; 256 case MaterialsMeltingpointEnum: return this->meltingpoint; 257 case ConstantsReferencetemperatureEnum: return this->referencetemperature; 258 case MaterialsMixedLayerCapacityEnum: return this->mixed_layer_capacity; 259 case MaterialsThermalExchangeVelocityEnum: return this->thermal_exchange_velocity; 260 case ConstantsGEnum: return this->g; 261 default: _error_("Enum "<<EnumToStringx(enum_in)<<" not supported yet"); 262 } 263 264 } 265 /*}}}*/ 243 266 /*FUNCTION Matpar::GetBeta {{{*/ 244 267 IssmDouble Matpar::GetBeta(){ -
issm/trunk-jpl/src/c/classes/Materials/Matpar.h
r16638 r16697 15 15 16 16 private: 17 int mid;17 int mid; 18 18 IssmDouble rho_ice; 19 19 IssmDouble rho_water; … … 133 133 IssmDouble GetMantleShearModulus(); 134 134 IssmDouble GetMantleDensity(); 135 void EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure);136 void ThermalToEnthalpy(IssmDouble* penthalpy,IssmDouble temperature,IssmDouble waterfraction,IssmDouble pressure);135 void EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure); 136 void ThermalToEnthalpy(IssmDouble* penthalpy,IssmDouble temperature,IssmDouble waterfraction,IssmDouble pressure); 137 137 IssmDouble GetDesFac(); 138 138 IssmDouble GetS0p(); 139 IssmDouble GetMaterialParameter(int in_enum); 139 140 bool IsInput(int name); 140 141 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.