void MainWindow::clear() { clearPartition(); clearMinkowski(); clearSkeleton(); clearOffset(); lgi->hide(); kgongi->hide(); }
Ctr2SufManager::~Ctr2SufManager() { //mesh delete mesh; //Contour clearOldContour(); clearContour(); //clear processed data clearPData(); //clear partition data clearPartition(); //clear face contour data clearFaceContour(); }
int FEM_Mesh_Parallel_broadcast(int fem_mesh,int masterRank,FEM_Comm_t comm_context){ int myRank; MPI_Comm_rank((MPI_Comm)comm_context,&myRank); //printf("[%d] FEM_Mesh_Parallel_broadcast called for mesh %d\n",myRank,fem_mesh); int new_mesh; if(myRank == masterRank){ //I am the master, i have the element connectivity data and need //to send it to everybody printf("[%d] Memory usage on vp 0 at the begining of partition %d \n",CkMyPe(),CmiMemoryUsage()); new_mesh=FEM_master_parallel_part(fem_mesh,masterRank,comm_context); }else{ new_mesh=FEM_slave_parallel_part(fem_mesh,masterRank,comm_context); } //temp to keep stuff from falling apart MPI_Barrier((MPI_Comm)comm_context); if(myRank == masterRank){ clearPartition(); } //printf("[%d] Partitioned mesh number %d \n",myRank,new_mesh); return new_mesh; }
void KW_CS2Surf::partitionStl() { clearFaceContour(); //clear the old result, a new generation start from here! //because other data may be dependent on the value of partition result, //so before clearpartition, other data must be cleared too! clearPartition(); clearStlSubspaceInfo(); //temporary data floatvector tssver; intvector tssedge; vector<intvector> tssface; intvector tssface_planeindex; vector<intvector> tssspace; vector<intvector> tssspace_planeside; //partition! SpacePartitioner partitioner; partitioner.partition( planenum, pparam, pbbox, enlargeratio, tssver, tssedge, tssface, tssface_planeindex, tssspace, tssspace_planeside); //copy them out this->vecSSver=tssver; this->vecSSedge=tssedge; this->iSSfacenum=tssface.size(); this->vecSSface_planeindex=tssface_planeindex; this->vecvecSSface=tssface; for (int i=0;i<this->iSSfacenum;i++) { this->vecSSfaceedgenum.push_back(vecvecSSface.at(i).size()); } this->iSSspacenum=tssspace.size(); this->vecvecSSspace=tssspace; for (int i=0;i<this->iSSspacenum;i++) { this->vecSSspacefacenum.push_back(this->vecvecSSspace.at(i).size()); } //clear the temporary data tssver.clear(); tssedge.clear(); int size = tssface.size(); for( int i = 0; i < size; i ++ ) tssface[ i ].clear(); tssface.clear(); tssface_planeindex.clear(); size = tssspace.size(); for( int i = 0; i < size; i ++) { tssspace[ i ].clear(); tssspace_planeside[ i ].clear(); } tssspace.clear(); tssspace_planeside.clear(); SortFaceInfo(); }
static void FEM_Mesh_partition(FEM_Mesh *src,int _nchunks,FEM_Mesh_Output *out) { src->setAscendingGlobalno(); FEM_Mesh_split(src,_nchunks,FEM_curPartition(),out); clearPartition(); }