Changeset 13887
- Timestamp:
- 11/06/12 15:40:16 (12 years ago)
- Location:
- issm/trunk-jpl/src/c/Container
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/c/Container/Elements.cpp ¶
r13813 r13887 294 294 } 295 295 /*}}}*/ 296 /*FUNCTION Elements::MaxNumNodes{{{*/ 297 int Elements::MaxNumNodes(void){ 298 299 int max=0; 300 int allmax; 301 int numnodes=0; 302 303 /*Now go through all elements, and get how many nodes they own, unless they are clone nodes: */ 304 for(int i=0;i<this->Size();i++){ 305 306 Element* element=dynamic_cast<Element*>(this->GetObjectByOffset(i)); 307 numnodes=element->GetNumberOfNodes(); 308 if(numnodes>max)max=numnodes; 309 } 310 311 /*Grab max of all cpus: */ 312 #ifdef _HAVE_MPI_ 313 MPI_Allreduce((void*)&max,(void*)&allmax,1,MPI_INT,MPI_MAX,IssmComm::GetComm()); 314 max=allmax; 315 #endif 316 317 return max; 318 } 319 /*}}}*/ 296 320 /*FUNCTION Elements::NumberOfElements{{{*/ 297 321 int Elements::NumberOfElements(void){ -
TabularUnified issm/trunk-jpl/src/c/Container/Elements.h ¶
r13797 r13887 27 27 void Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters); 28 28 void DeleteResults(void); 29 int MaxNumNodes(void); 29 30 void ProcessResultsUnits(void); 30 31 void SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters);
Note:
See TracChangeset
for help on using the changeset viewer.