Changeset 25539 for issm/trunk-jpl/src/c/classes/Radar.cpp
- Timestamp:
- 09/07/20 03:12:14 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Radar.cpp
r25508 r25539 30 30 } 31 31 /*}}}*/ 32 Radar::Radar(char* in_name, int in_definitionenum){/*{{{*/ 32 Radar::Radar(char* in_name, int in_definitionenum){/*{{{*/ 33 33 this->definitionenum=in_definitionenum; 34 34 this->name = xNew<char>(strlen(in_name)+1); … … 59 59 /*}}}*/ 60 60 void Radar::Marshall(MarshallHandle* marshallhandle){/*{{{*/ 61 _error_("not implemented yet!"); 62 } 61 _error_("not implemented yet!"); 62 } 63 63 /*}}}*/ 64 64 int Radar::ObjectEnum(void){/*{{{*/ … … 77 77 } 78 78 /*}}}*/ 79 IssmDouble Radar::Response(FemModel* femmodel){/*{{{*/ 80 int i; 81 for(i=0;i<femmodel->elements->Size();i++){ 82 Element* element=(Element*)femmodel->elements->GetObjectByOffset(i); 79 IssmDouble Radar::Response(FemModel* femmodel){/*{{{*/ 80 for(Object* & object : femmodel->elements->objects){ 81 Element* element=xDynamicCast<Element*>(object); 83 82 this->ComputeRadarAttenuation(element); 84 this->ComputeRadarPower(element); 83 this->ComputeRadarPower(element); 85 84 } 86 85 return 0.; … … 112 111 IssmDouble E_Cl_W97=3.6800e-20; 113 112 IssmDouble E_NH=3.6800e-20; 114 IssmDouble mol_H_hol=1.6; 115 IssmDouble mol_H_lgp=0.2; 116 IssmDouble mol_Cl_hol=0.4; 117 IssmDouble mol_Cl_lgp=1.8; 113 IssmDouble mol_H_hol=1.6; 114 IssmDouble mol_H_lgp=0.2; 115 IssmDouble mol_Cl_hol=0.4; 116 IssmDouble mol_Cl_lgp=1.8; 118 117 IssmDouble mol_NH_hol=0.5; 119 IssmDouble mol_NH_lgp=0.4; 118 IssmDouble mol_NH_lgp=0.4; 120 119 IssmDouble mol_H, mol_Cl, mol_NH; 121 120 IssmDouble attenuation_rate_macgregor[NUMVERTICES]; … … 129 128 /*Retrieve all inputs we will be needing: */ 130 129 Input* temp_input=element->GetInput(TemperatureEnum); _assert_(temp_input); 131 Input* ice_period_input=element->GetInput(RadarIcePeriodEnum); _assert_(ice_period_input); 130 Input* ice_period_input=element->GetInput(RadarIcePeriodEnum); _assert_(ice_period_input); 132 131 133 132 /* Start looping on the number of vertices: */ … … 136 135 for (int iv=0;iv<NUMVERTICES;iv++){ 137 136 gauss->GaussVertex(iv); 138 137 139 138 /*Get ice temperature: */ 140 139 temp_input->GetInputValue(&temperature,gauss); 141 140 ice_period_input->GetInputValue(&ice_period,gauss); 142 141 143 if(ice_period>0){; 142 if(ice_period>0){; 144 143 mol_H=mol_H_hol; 145 144 mol_Cl=mol_Cl_hol; 146 145 mol_NH=mol_NH_hol; 147 146 } 148 else{ 147 else{ 149 148 mol_H=mol_H_lgp; 150 mol_Cl=mol_Cl_lgp; 149 mol_Cl=mol_Cl_lgp; 151 150 mol_NH=mol_NH_lgp; 152 151 } … … 209 208 IssmDouble rho_ice, gravity, pressure, pressure_melting_pt, frozen_temp, basal_temp, basal_pmp; 210 209 GaussPenta* gauss=NULL; 211 210 212 211 /* Get node coordinates*/ 213 212 element->GetVerticesCoordinates(&xyz_list); … … 253 252 pressure=rho_ice*gravity*thickness; 254 253 pressure_melting_pt=t_tp-gamma*(pressure-p_tp); 255 254 256 255 if((temperature-pressure_melting_pt)<=-1){ 257 256 reflectivity=-40;
Note:
See TracChangeset
for help on using the changeset viewer.