Changeset 26103
- Timestamp:
- 03/16/21 08:46:08 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r26099 r26103 1284 1284 _printf_("list of vertices on surface: "<<values[0]<<" "<<values[1]<<" "<<values[2]); 1285 1285 _error_("Could not find 2 vertices on surface"); 1286 } 1287 /*}}}*/ 1288 void Tria::ElementCoordinates(Vector<IssmDouble>* vxe,Vector<IssmDouble>* vye,Vector<IssmDouble>* vze, bool spherical){/*{{{*/ 1289 1290 /*Look for x,y,z coordinates:*/ 1291 IssmDouble xyz_list[NUMVERTICES][3]; 1292 ::GetVerticesCoordinates(&xyz_list[0][0],this->vertices,NUMVERTICES); 1293 1294 /*Find centroid:*/ 1295 IssmDouble xe=(xyz_list[0][0]+xyz_list[1][0]+xyz_list[2][0])/3.0; 1296 IssmDouble ye=(xyz_list[0][1]+xyz_list[1][1]+xyz_list[2][1])/3.0; 1297 IssmDouble ze=(xyz_list[0][2]+xyz_list[1][2]+xyz_list[2][2])/3.0; 1298 1299 if(!spherical){ 1300 vxe->SetValue(this->sid,xe,INS_VAL); 1301 vye->SetValue(this->sid,ye,INS_VAL); 1302 vze->SetValue(this->sid,ze,INS_VAL); 1303 } 1304 else _error_("spherical coordinates not supported yet!"); 1305 return; 1286 1306 } 1287 1307 /*}}}*/ … … 6219 6239 } 6220 6240 /*}}}*/ 6221 void Tria::ElementCoordinates(Vector<IssmDouble>* vxe,Vector<IssmDouble>* vye,Vector<IssmDouble>* vze, bool spherical){/*{{{*/6222 6223 /*Look for x,y,z coordinates:*/6224 IssmDouble xyz_list[NUMVERTICES][3];6225 IssmDouble xe,ye,ze;6226 6227 /*Element XYZ list*/6228 ::GetVerticesCoordinates(&xyz_list[0][0],this->vertices,NUMVERTICES);6229 6230 /*Find centroid:*/6231 xe=(xyz_list[0][0]+xyz_list[1][0]+xyz_list[2][0])/3.0;6232 ye=(xyz_list[0][1]+xyz_list[1][1]+xyz_list[2][1])/3.0;6233 ze=(xyz_list[0][2]+xyz_list[1][2]+xyz_list[2][2])/3.0;6234 6235 if(!spherical){6236 vxe->SetValue(this->sid,xe,INS_VAL);6237 vye->SetValue(this->sid,ye,INS_VAL);6238 vze->SetValue(this->sid,ze,INS_VAL);6239 }6240 else _error_("spherical coordinates not supported yet!");6241 return;6242 }6243 /*}}}*/6244 6241 6245 6242 //new logic
Note:
See TracChangeset
for help on using the changeset viewer.