Changeset 27895
- Timestamp:
- 09/05/23 09:16:20 (19 months ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/c/classes/Cfdragcoeffabsgrad.cpp ¶
r27728 r27895 30 30 this->name = NULL; 31 31 this->J = 0.; 32 this->firsttimepassed = false; 32 33 } 33 34 /*}}}*/ … … 40 41 41 42 this->J = 0.; 43 this->firsttimepassed = false; 42 44 } 43 45 /*}}}*/ … … 50 52 51 53 this->J = in_J; 54 this->firsttimepassed = false; 52 55 } 53 56 /*}}}*/ … … 107 110 IssmDouble J_sum=0.; 108 111 109 for(Object* & object : femmodel->elements->objects){ 110 Element* element=xDynamicCast<Element*>(object); 111 J_part+=this->Cfdragcoeffabsgrad_Calculation(element); 112 if (!this->firsttimepassed){ 113 for(Object* & object : femmodel->elements->objects){ 114 Element* element=xDynamicCast<Element*>(object); 115 J_part+=this->Cfdragcoeffabsgrad_Calculation(element); 116 } 117 118 ISSM_MPI_Allreduce ( (void*)&J_part,(void*)&J_sum,1,ISSM_MPI_DOUBLE,ISSM_MPI_SUM,IssmComm::GetComm()); 119 ISSM_MPI_Bcast(&J_sum,1,ISSM_MPI_DOUBLE,0,IssmComm::GetComm()); 120 this->J=J_sum; 121 122 this->firsttimepassed = true; 112 123 } 113 114 ISSM_MPI_Allreduce ( (void*)&J_part,(void*)&J_sum,1,ISSM_MPI_DOUBLE,ISSM_MPI_SUM,IssmComm::GetComm()); 115 ISSM_MPI_Bcast(&J_sum,1,ISSM_MPI_DOUBLE,0,IssmComm::GetComm()); 116 this->J=J_sum; 117 118 return J; 124 return this->J; 119 125 }/*}}}*/ 120 126 IssmDouble Cfdragcoeffabsgrad::Cfdragcoeffabsgrad_Calculation(Element* element){/*{{{*/ -
TabularUnified issm/trunk-jpl/src/c/classes/Cfdragcoeffabsgrad.h ¶
r27728 r27895 18 18 int definitionenum; 19 19 char *name; 20 bool firsttimepassed; 20 21 IssmDouble J; 21 22
Note:
See TracChangeset
for help on using the changeset viewer.