source:
issm/oecreview/Archive/13393-13976/ISSM-13886-13887.diff@
13980
Last change on this file since 13980 was 13980, checked in by , 12 years ago | |
---|---|
File size: 1.6 KB |
-
../trunk-jpl/src/c/Container/Elements.cpp
293 293 delete patch; 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){ 298 322 -
../trunk-jpl/src/c/Container/Elements.h
26 26 /*numerics*/ 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); 31 32 void ToResults(Results* results,Parameters* parameters);
Note:
See TracBrowser
for help on using the repository browser.