void UParticleModuleTrailSource::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) { InitializeDefaults(); // SourceOffsetCount // SourceOffsetDefaults UProperty* PropertyThatChanged = PropertyChangedEvent.Property; if (PropertyThatChanged) { if (PropertyThatChanged->GetFName() == FName(TEXT("SourceOffsetCount"))) { if (SourceOffsetDefaults.Num() > 0) { if (SourceOffsetDefaults.Num() < SourceOffsetCount) { // Add additional slots SourceOffsetDefaults.InsertZeroed(SourceOffsetDefaults.Num(), SourceOffsetCount - SourceOffsetDefaults.Num()); } else if (SourceOffsetDefaults.Num() > SourceOffsetCount) { // Remove the required slots int32 RemoveIndex = SourceOffsetCount ? (SourceOffsetCount - 1) : 0; SourceOffsetDefaults.RemoveAt(RemoveIndex, SourceOffsetDefaults.Num() - SourceOffsetCount); } } else { if (SourceOffsetCount > 0) { // Add additional slots SourceOffsetDefaults.InsertZeroed(0, SourceOffsetCount); } } } } Super::PostEditChangeProperty(PropertyChangedEvent); }
void GetConfig(char *fname) { strbuf=(char *) valloc(2000,"strbuf!",0); InitializeDefaults(); if (!(cfg=fopen(fname,"r"))) { printf("Unable to open config file. Using defaults... \n"); return; } while (1) { fscanf(cfg,"%s",strbuf); if (!strcmp(strbuf,"difficulty")) { fscanf(cfg,"%s",strbuf); difficulty=atoi(strbuf); continue; } if (!strcmp(strbuf,"nocdaudio")) { //nocdaudio=1; continue; } if (!strcmp(strbuf,"vidmode")) { fscanf(cfg,"%s",strbuf); vm=atoi(strbuf); continue; } if (!strcmp(strbuf,"white")) { fscanf(cfg,"%s",strbuf); white=atoi(strbuf); brightw=atoi(strbuf); TextColor(atoi(strbuf)); continue; } if (!strcmp(strbuf,"black")) { fscanf(cfg,"%s",strbuf); black=atoi(strbuf); continue; } if (!strcmp(strbuf,"winbg")) { fscanf(cfg,"%s",strbuf); winbg=atoi(strbuf); continue; } if (!strcmp(strbuf,"shadow")) { fscanf(cfg,"%s",strbuf); darkw=atoi(strbuf); continue; } if (!strcmp(strbuf,"darkred")) { fscanf(cfg,"%s",strbuf); darkred=atoi(strbuf); continue; } if (!strcmp(strbuf,"titlebg")) { fscanf(cfg,"%s",strbuf); titlebg=atoi(strbuf); continue; } if (!strcmp(strbuf,"pad")) { fscanf(cfg,"%s",strbuf); pad=atoi(strbuf); continue; } if (!strcmp(strbuf, "scrollmode")) { fscanf(cfg,"%s",strbuf); scrollmode=atoi(strbuf); continue; } // aen if (!strcmp(strbuf, "mouse_scroll")) { fscanf(cfg,"%s",strbuf); mouse_scroll=atoi(strbuf)&1; continue; } if (!strcmp(strbuf, "md_device")) { fscanf(cfg, "%s", strbuf); md_device=atoi(strbuf); continue; } if (!strcmp(strbuf, "th")) { fscanf(cfg,"%s",strbuf); th=atoi(strbuf); continue; } if (!strcmp(strbuf, "mh")) { fscanf(cfg,"%s",strbuf); mh=atoi(strbuf); continue; } if (!strcmp(strbuf, "amxofs")) { fscanf(cfg,"%s",strbuf); amxofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "amyofs")) { fscanf(cfg,"%s",strbuf); amyofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "mmxofs")) { fscanf(cfg,"%s",strbuf); mmxofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "mmyofs")) { fscanf(cfg,"%s",strbuf); mmyofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "cnxofs")) { fscanf(cfg,"%s",strbuf); cnxofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "cnyofs")) { fscanf(cfg,"%s",strbuf); cnyofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "lmxofs")) { fscanf(cfg,"%s",strbuf); lmyofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "lmyofs")) { fscanf(cfg,"%s",strbuf); lmyofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "lvxofs")) { fscanf(cfg,"%s",strbuf); lvxofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "lvyofs")) { fscanf(cfg,"%s",strbuf); lvyofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "mpxofs")) { fscanf(cfg,"%s",strbuf); mpxofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "mpyofs")) { fscanf(cfg,"%s",strbuf); mpyofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "vaxofs")) { fscanf(cfg,"%s",strbuf); vaxofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "vayofs")) { fscanf(cfg,"%s",strbuf); vayofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "zexofs")) { fscanf(cfg,"%s",strbuf); zexofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "zeyofs")) { fscanf(cfg,"%s",strbuf); zeyofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "exofs")) { fscanf(cfg,"%s",strbuf); exofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "eyofs")) { fscanf(cfg,"%s",strbuf); eyofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "prxofs")) { fscanf(cfg,"%s",strbuf); prxofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "pryofs")) { fscanf(cfg,"%s",strbuf); pryofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "rsxofs")) { fscanf(cfg,"%s",strbuf); rsxofs=atoi(strbuf); continue; } if (!strcmp(strbuf, "rsyofs")) { fscanf(cfg,"%s",strbuf); rsyofs=atoi(strbuf); continue; } if (!strcmp(strbuf,"vcedprog")) { fscanf(cfg,"%s",vcedprog); continue; } break; } fclose(cfg); }
void UParticleModuleVelocity::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) { InitializeDefaults(); Super::PostEditChangeProperty(PropertyChangedEvent); }
LRESULT CALLBACK MainProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { HWND temp; switch(message) { case WM_INITDIALOG: mainHWND = hwnd; InitializeDefaults(); SendMessage(GetDlgItem(hwnd, IDC_EXENAME), WM_SETTEXT, 0, (LPARAM)(LPCSTR)launchersettings.EXEName); SendMessage(GetDlgItem(hwnd, IDC_CONFIGFILE), WM_SETTEXT, 0, (LPARAM)(LPCSTR)launchersettings.ConfigFile); break; case WM_CREATE: { break; } case WM_DESTROY: { PostQuitMessage(0); break; } case WM_COMMAND: { switch(LOWORD(wParam)) { case 2: PostMessage(hwnd, WM_DESTROY, 0, 0); break; case IDC_ABOUT: // The About button. sprintf(TempString, "%s %s by %s - %s", APPTITLE, APPVERSION, APPAUTHOR, APPCOMPANY); MessageBox(mainHWND, TempString, "About", MB_OK|MB_APPLMODAL); break; case IDC_FINDEXENAME: ChooseEXEName(); break; case IDC_FINDCONFIGNAME: ChooseConfigName(); break; case IDC_ADDFILE: AddExternalFile(); break; case IDC_REMOVEFILE: temp = GetDlgItem(mainHWND, IDC_EXTFILECOMBO); SendMessage(temp, CB_DELETESTRING, SendMessage(temp, CB_GETCURSEL, 0, 0), 0); break; case IDC_HOSTGAME: DialogBox(g_hInst, (LPCSTR)IDD_HOSTGAME, mainHWND, (DLGPROC)HostProc); break; case IDC_JOINGAME: DialogBox(g_hInst, (LPCSTR)IDD_JOINGAME, mainHWND, (DLGPROC)JoinProc); break; case IDC_GO: CompileArguments(); RunSRB2(); break; default: break; } break; } case WM_PAINT: { break; } } return 0; }
//============================================================================== LinearProblem_CrsSingletonFilter:: LinearProblem_CrsSingletonFilter( bool verbose ) : verbose_(verbose) { InitializeDefaults(); }
void UParticleModuleCameraOffset::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) { InitializeDefaults(); Super::PostEditChangeProperty(PropertyChangedEvent); }
void UParticleModuleSizeMultiplyLife::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) { InitializeDefaults(); Super::PostEditChangeProperty(PropertyChangedEvent); }
//======================================================= EpetraExt_HypreIJMatrix::EpetraExt_HypreIJMatrix(HYPRE_IJMatrix matrix) : Epetra_BasicRowMatrix(Epetra_MpiComm(hypre_IJMatrixComm(matrix))), Matrix_(matrix), ParMatrix_(0), NumMyRows_(-1), NumGlobalRows_(-1), NumGlobalCols_(-1), MyRowStart_(-1), MyRowEnd_(-1), MatType_(-1), TransposeSolve_(false), SolveOrPrec_(Solver) { IsSolverSetup_ = new bool[1]; IsPrecondSetup_ = new bool[1]; IsSolverSetup_[0] = false; IsPrecondSetup_[0] = false; // Initialize default values for global variables int ierr = 0; ierr += InitializeDefaults(); TEUCHOS_TEST_FOR_EXCEPTION(ierr != 0, std::logic_error, "Couldn't initialize default values."); // Create array of global row ids Teuchos::Array<int> GlobalRowIDs; GlobalRowIDs.resize(NumMyRows_); for (int i = MyRowStart_; i <= MyRowEnd_; i++) { GlobalRowIDs[i-MyRowStart_] = i; } // Create array of global column ids int new_value = 0; int entries = 0; std::set<int> Columns; int num_entries; double *values; int *indices; for(int i = 0; i < NumMyRows_; i++){ ierr += HYPRE_ParCSRMatrixGetRow(ParMatrix_, i+MyRowStart_, &num_entries, &indices, &values); ierr += HYPRE_ParCSRMatrixRestoreRow(ParMatrix_, i+MyRowStart_,&num_entries,&indices,&values); TEUCHOS_TEST_FOR_EXCEPTION(ierr != 0, std::logic_error, "Couldn't get row of matrix."); entries = num_entries; for(int j = 0; j < num_entries; j++){ // Insert column ids from this row into set new_value = indices[j]; Columns.insert(new_value); } } int NumMyCols = Columns.size(); Teuchos::Array<int> GlobalColIDs; GlobalColIDs.resize(NumMyCols); std::set<int>::iterator it; int counter = 0; for (it = Columns.begin(); it != Columns.end(); it++) { // Get column ids in order GlobalColIDs[counter] = *it; counter = counter + 1; } //printf("Proc[%d] Rows from %d to %d, num = %d\n", Comm().MyPID(), MyRowStart_,MyRowEnd_, NumMyRows_); Epetra_Map RowMap(-1, NumMyRows_, &GlobalRowIDs[0], 0, Comm()); Epetra_Map ColMap(-1, NumMyCols, &GlobalColIDs[0], 0, Comm()); //Need to call SetMaps() SetMaps(RowMap, ColMap); // Get an MPI_Comm to create vectors. // The vectors will be reused in Multiply(), so that they aren't recreated every time. MPI_Comm comm; ierr += HYPRE_ParCSRMatrixGetComm(ParMatrix_, &comm); TEUCHOS_TEST_FOR_EXCEPTION(ierr != 0, std::logic_error, "Couldn't get communicator from Hypre Matrix."); ierr += HYPRE_IJVectorCreate(comm, MyRowStart_, MyRowEnd_, &X_hypre); ierr += HYPRE_IJVectorSetObjectType(X_hypre, HYPRE_PARCSR); ierr += HYPRE_IJVectorInitialize(X_hypre); ierr += HYPRE_IJVectorAssemble(X_hypre); ierr += HYPRE_IJVectorGetObject(X_hypre, (void**) &par_x); TEUCHOS_TEST_FOR_EXCEPTION(ierr != 0, std::logic_error, "Couldn't create Hypre X vector."); ierr += HYPRE_IJVectorCreate(comm, MyRowStart_, MyRowEnd_, &Y_hypre); ierr += HYPRE_IJVectorSetObjectType(Y_hypre, HYPRE_PARCSR); ierr += HYPRE_IJVectorInitialize(Y_hypre); ierr += HYPRE_IJVectorAssemble(Y_hypre); ierr += HYPRE_IJVectorGetObject(Y_hypre, (void**) &par_y); TEUCHOS_TEST_FOR_EXCEPTION(ierr != 0, std::logic_error, "Couldn't create Hypre Y vector."); x_vec = (hypre_ParVector *) hypre_IJVectorObject(((hypre_IJVector *) X_hypre)); x_local = hypre_ParVectorLocalVector(x_vec); y_vec = (hypre_ParVector *) hypre_IJVectorObject(((hypre_IJVector *) Y_hypre)); y_local = hypre_ParVectorLocalVector(y_vec); SolverCreatePtr_ = &EpetraExt_HypreIJMatrix::Hypre_ParCSRPCGCreate; SolverDestroyPtr_ = &HYPRE_ParCSRPCGDestroy; SolverSetupPtr_ = &HYPRE_ParCSRPCGSetup; SolverSolvePtr_ = &HYPRE_ParCSRPCGSolve; SolverPrecondPtr_ = &HYPRE_ParCSRPCGSetPrecond; CreateSolver(); PrecondCreatePtr_ = &EpetraExt_HypreIJMatrix::Hypre_EuclidCreate; PrecondDestroyPtr_ = &HYPRE_EuclidDestroy; PrecondSetupPtr_ = &HYPRE_EuclidSetup; PrecondSolvePtr_ = &HYPRE_EuclidSolve; CreatePrecond(); ComputeNumericConstants(); ComputeStructureConstants(); } //EpetraExt_HYPREIJMatrix(Hypre_IJMatrix) Constructor
void UParticleModuleParameterDynamic::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) { InitializeDefaults(); UpdateUsageFlags(); }
void UParticleModuleEventReceiverSpawn::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) { InitializeDefaults(); Super::PostEditChangeProperty(PropertyChangedEvent); }
//============================================================================== Epetra_CrsSingletonFilter::Epetra_CrsSingletonFilter() { InitializeDefaults(); }
void UParticleModuleCollisionGPU::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) { InitializeDefaults(); Super::PostEditChangeProperty(PropertyChangedEvent); }