//========================================================================= int Epetra_MapColoring::MaxNumColors() const { if (!ListsAreValid_) GenerateLists(); int tmp1 = NumColors_, tmp2; Map().Comm().MaxAll(&tmp1, &tmp2, 1); return(tmp2); }
Epetra_BlockMap * Epetra_MapColoring::TGenerateBlockMap(int Color) const { if (!ListsAreValid_) GenerateLists(); int arrayIndex = -1; if( ColorIDs_ ) arrayIndex = ColorIDs_->Get(Color); int NumElements = 0; int * ColorElementLIDs = 0; int * ColorElementSizes = 0; int_type * ColorElementGIDs = 0; if (arrayIndex>-1) NumElements = ColorCount_[arrayIndex]; if (NumElements>0) { ColorElementLIDs = ColorLIDList(Color); ColorElementSizes = new int[NumElements]; ColorElementGIDs = new int_type[NumElements]; for (int i=0; i<NumElements; i++) ColorElementGIDs[i] = (int_type) Map().GID64(ColorElementLIDs[i]); } int * MapElementSizes = Map().ElementSizeList(); {for (int i=0; i<NumElements; i++) ColorElementSizes[i] = MapElementSizes[ColorElementLIDs[i]];} Epetra_BlockMap * map = new Epetra_BlockMap((int_type) -1, NumElements, ColorElementGIDs, ColorElementSizes, (int_type) Map().IndexBase64(), Map().Comm()); if (ColorElementGIDs!=0) delete [] ColorElementGIDs; if (ColorElementSizes!=0) delete [] ColorElementSizes; return(map); }
//========================================================================= int Epetra_MapColoring::NumElementsWithColor(int Color) const { if (!ListsAreValid_) GenerateLists(); int arrayIndex = -1; if( ColorIDs_ ) arrayIndex = ColorIDs_->Get(Color); if (arrayIndex>-1) return(ColorCount_[arrayIndex]); else return(0); }
//========================================================================= int * Epetra_MapColoring::ColorLIDList(int Color) const { if (!ListsAreValid_) GenerateLists(); int arrayIndex = -1; if( ColorIDs_ ) arrayIndex = ColorIDs_->Get(Color); if (arrayIndex>-1) return(ColorLists_[arrayIndex]); else return(0); }
void FScreenShotManager::HandleScreenShotMessage( const FAutomationWorkerScreenImage& Message, const IMessageContextRef& Context ) { bool bTree = true; FString FileName = FPaths::RootDir() + Message.ScreenShotName; IFileManager::Get().MakeDirectory( *FPaths::GetPath(FileName), bTree ); FFileHelper::SaveArrayToFile( Message.ScreenImage, *FileName ); // Regenerate the UI GenerateLists(); ScreenShotRoot->SetFilter(MakeShareable( new ScreenShotFilterCollection())); }