Changeset 19062
- Timestamp:
- 02/02/15 14:46:12 (10 years ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/FemModel.cpp
r19033 r19062 694 694 case DivergenceEnum: this->Divergencex(responses); break; 695 695 case MaxDivergenceEnum: this->MaxDivergencex(responses); break; 696 case IceMassEnum: this->IceMassx(responses); break; 696 697 case IceVolumeEnum: this->IceVolumex(responses); break; 697 698 case IceVolumeAboveFloatationEnum: this->IceVolumeAboveFloatationx(responses); break; … … 777 778 case DivergenceEnum: this->Divergencex(&double_result); break; 778 779 case MaxDivergenceEnum: this->MaxDivergencex(&double_result); break; 780 case IceMassEnum: this->IceMassx(&double_result); break; 779 781 case IceVolumeEnum: this->IceVolumex(&double_result); break; 780 782 case IceVolumeAboveFloatationEnum: this->IceVolumeAboveFloatationx(&double_result); break; … … 1394 1396 1395 1397 }/*}}}*/ 1398 void FemModel::IceMassx(IssmDouble* pM){/*{{{*/ 1399 1400 IssmDouble local_ice_mass = 0; 1401 IssmDouble total_ice_mass; 1402 1403 for(int i=0;i<this->elements->Size();i++){ 1404 Element* element=xDynamicCast<Element*>(this->elements->GetObjectByOffset(i)); 1405 local_ice_mass+=element->IceMass(); 1406 } 1407 ISSM_MPI_Reduce(&local_ice_mass,&total_ice_mass,1,ISSM_MPI_DOUBLE,ISSM_MPI_SUM,0,IssmComm::GetComm() ); 1408 ISSM_MPI_Bcast(&total_ice_mass,1,ISSM_MPI_DOUBLE,0,IssmComm::GetComm()); 1409 1410 /*Assign output pointers: */ 1411 *pM=total_ice_mass; 1412 1413 }/*}}}*/ 1396 1414 void FemModel::IceVolumex(IssmDouble* pV){/*{{{*/ 1397 1415 -
issm/trunk-jpl/src/c/classes/FemModel.h
r19033 r19062 79 79 void Divergencex(IssmDouble* pdiv); 80 80 void MaxDivergencex(IssmDouble* pdiv); 81 void IceMassx(IssmDouble* pV); 81 82 void IceVolumex(IssmDouble* pV); 82 83 void IceVolumeAboveFloatationx(IssmDouble* pV);
Note:
See TracChangeset
for help on using the changeset viewer.