eddyDissMultiFuelStreamModel<CombThermoType, ThermoType>::eddyDissMultiFuelStreamModel ( const word& modelType, const fvMesh& mesh ) : singleStepCombustion<CombThermoType, ThermoType>(modelType, mesh), C_(readScalar(this->coeffs().lookup("C_EDC"))), Cd_(readScalar(this->coeffs().lookup("C_Diff"))), Cstiff_(readScalar(this->coeffs().lookup("C_Stiff"))), fuelSpecies_(this->coeffs().lookup("fuelSpecies")), fuelSpeciesID_(fuelSpecies_.size()), fuelSpeciesSum_ ( IOobject ( "fuelSpeciesSum", mesh.time().timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("zero", dimless, 0.0) ) { initPars(); }
void wxStfFitSelDlg::SetPars() { Update_fselect(); // get parameter names from selected function: try { // fill a temporary array: if (pDoc==NULL) return; std::size_t fitSize= pDoc->GetFitEnd()-pDoc->GetFitBeg(); if (fitSize<=0) { wxGetApp().ErrorMsg(wxT("Check fit cursor settings")); return; } Vector_double x(fitSize); //fill array: std::copy(&pDoc->cursec()[pDoc->GetFitBeg()], &pDoc->cursec()[pDoc->GetFitBeg()+fitSize], &x[0]); Vector_double initPars(wxGetApp().GetFuncLib().at(m_fselect).pInfo.size()); wxGetApp().GetFuncLib().at(m_fselect).init( x, pDoc->GetBase(), pDoc->GetPeak(), pDoc->GetRTLoHi(), pDoc->GetHalfDuration(), pDoc->GetXScale(), initPars); std::vector< wxStaticText* >::iterator it1; std::vector< wxTextCtrl* >::iterator it2 = paramEntryArray.begin(); std::size_t n_p = 0; for (it1 = paramDescArray.begin(); it1 != paramDescArray.end() && it2 != paramEntryArray.end(); it1++) { if (n_p < wxGetApp().GetFuncLib().at(m_fselect).pInfo.size()) { (*it1)->Show(); (*it2)->Show(); // Parameter label: (*it1)->SetLabel(stf::std2wx(wxGetApp().GetFuncLib().at(m_fselect).pInfo[n_p].desc)); // Initial parameter values: wxString strInit; strInit << initPars[n_p]; (*it2)->SetValue(strInit); (*it2)->Enable(!noInput); } else { (*it1)->Show(false); (*it2)->Show(false); } it2++; n_p++; } } catch (const std::out_of_range& e) { wxString msg(wxT("Could not retrieve selected function from library:\n")); msg += wxString( e.what(), wxConvLocal ); wxLogMessage(msg); m_fselect = -1; return; } this->Layout(); }