Changeset 18742
- Timestamp:
- 11/05/14 16:29:48 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/LevelsetAnalysis.cpp
r18736 r18742 100 100 101 101 /*Intermediaries */ 102 int dim, domaintype ;102 int dim, domaintype, iscalvingrate; 103 103 int i, row, col; 104 104 IssmDouble kappa; … … 109 109 IssmDouble* xyz_list = NULL; 110 110 111 /*Get problem dimension*/ 111 /*Get problem dimension and whether there is calving or not*/ 112 basalelement->FindParam(&iscalvingrate,MasstransportIscalvingrateEnum); 112 113 basalelement->FindParam(&domaintype,DomainTypeEnum); 113 114 switch(domaintype){ … … 142 143 vx_input=basalelement->GetInput(VxEnum); _assert_(vx_input); 143 144 vy_input=basalelement->GetInput(VyEnum); _assert_(vy_input); 144 calvingratex_input=basalelement->GetInput(CalvingratexEnum); _assert_(calvingratex_input); 145 calvingratey_input=basalelement->GetInput(CalvingrateyEnum); _assert_(calvingratey_input); 145 if(iscalvingrate){ 146 calvingratex_input=basalelement->GetInput(CalvingratexEnum); _assert_(calvingratex_input); 147 calvingratey_input=basalelement->GetInput(CalvingrateyEnum); _assert_(calvingratey_input); 148 } 146 149 } 147 150 else{ 148 151 if(dim==1){ 149 152 vx_input=basalelement->GetInput(VxEnum); _assert_(vx_input); 150 calvingratex_input=basalelement->GetInput(CalvingratexEnum); _assert_(calvingratex_input); 153 if(iscalvingrate){ 154 calvingratex_input=basalelement->GetInput(CalvingratexEnum); _assert_(calvingratex_input); 155 } 151 156 } 152 157 if(dim==2){ 153 158 vx_input=basalelement->GetInput(VxAverageEnum); _assert_(vx_input); 154 159 vy_input=basalelement->GetInput(VyAverageEnum); _assert_(vy_input); 155 calvingratex_input=basalelement->GetInput(CalvingratexAverageEnum); _assert_(calvingratex_input); 156 calvingratey_input=basalelement->GetInput(CalvingrateyAverageEnum); _assert_(calvingratey_input); 160 if(iscalvingrate){ 161 calvingratex_input=basalelement->GetInput(CalvingratexAverageEnum); _assert_(calvingratex_input); 162 calvingratey_input=basalelement->GetInput(CalvingrateyAverageEnum); _assert_(calvingratey_input); 163 } 157 164 } 158 165 } … … 185 192 vx_input->GetInputValue(&v[0],gauss); // in 3D case, add mesh velocity 186 193 vy_input->GetInputValue(&v[1],gauss); 187 calvingratex_input->GetInputValue(&c[0],gauss); // in 3D case, add mesh velocity 188 calvingratey_input->GetInputValue(&c[1],gauss); 194 if(iscalvingrate){ 195 calvingratex_input->GetInputValue(&c[0],gauss); // in 3D case, add mesh velocity 196 calvingratey_input->GetInputValue(&c[1],gauss); 197 for(i=0;i<dim;i++) w[i]=v[i]-c[i]; 198 } 199 else{ 200 for(i=0;i<dim;i++) w[i]=v[i]; 201 } 189 202 //lsf_slopex_input->GetInputValue(&dlsf[0],gauss); 190 203 //lsf_slopey_input->GetInputValue(&dlsf[1],gauss); … … 200 213 //for(i=0;i<dim;i++) c[i]=0.; 201 214 202 for(i=0;i<dim;i++) w[i]=v[i]-c[i];203 215 204 216 for(row=0;row<dim;row++)
Note:
See TracChangeset
for help on using the changeset viewer.