Changeset 28259
- Timestamp:
- 05/07/24 10:52:50 (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/toolkits/issm/IssmMpiVec.h
r27102 r28259 588 588 /*}}}*/ 589 589 void Pow(doubletype scale_factor){/*{{{*/ 590 591 int i; 592 for(i=0;i<this->M;i++)this->vector[i]=pow(this->vector[i],scale_factor); 593 590 for(int i=0;i<this->M;i++)this->vector[i]=pow(this->vector[i],scale_factor); 594 591 } 595 592 /*}}}*/ 596 593 void Sum(doubletype* pvalue){/*{{{*/ 597 _error_("not support yet!"); 594 595 doubletype local_sum=0; 596 doubletype sum; 597 598 for(int i=0;i<this->m;i++) local_value+=this->vector[i]; 599 ISSM_MPI_Reduce(&local_sum, &sum, 1, ISSM_MPI_DOUBLE, ISSM_MPI_SUM, 0, IssmComm::GetComm()); 600 ISSM_MPI_Bcast(&sum,1,ISSM_MPI_DOUBLE,0,IssmComm::GetComm()); 601 *pvalue=sum; 602 598 603 } 599 604 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.