本文整理汇总了C++中opm::parameter::ParameterGroup::insertParameter方法的典型用法代码示例。如果您正苦于以下问题:C++ ParameterGroup::insertParameter方法的具体用法?C++ ParameterGroup::insertParameter怎么用?C++ ParameterGroup::insertParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类opm::parameter::ParameterGroup
的用法示例。
在下文中一共展示了ParameterGroup::insertParameter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LinearSolverISTLAMG
LinearSolverISTLAMG()
{
Opm::parameter::ParameterGroup params;
params.insertParameter("linsolver_tolerance",
boost::lexical_cast<std::string>(5.0e-9));
params.insertParameter("linsoler_verbosity",
boost::lexical_cast<std::string>(1));
params.insertParameter("linsolver_type",
boost::lexical_cast<std::string>(1));
ls_.init(params);
}
示例2: createEclipseWriter
Opm::EclipseWriterPtr createEclipseWriter(Opm::DeckConstPtr deck,
Opm::EclipseStatePtr eclipseState,
std::string& eclipse_data_filename) {
Opm::parameter::ParameterGroup params;
params.insertParameter("deck_filename", eclipse_data_filename);
const Opm::PhaseUsage phaseUsage = Opm::phaseUsageFromDeck(deck);
Opm::EclipseWriterPtr eclWriter(new Opm::EclipseWriter(params,
eclipseState,
phaseUsage,
eclipseState->getEclipseGrid()->getCartesianSize(),
0));
return eclWriter;
}
示例3: createEclipseWriter
void createEclipseWriter(const char *deckString)
{
Opm::ParseContext parseContext;
Opm::ParserConstPtr parser(new Opm::Parser());
deck = parser->parseString(deckString, parseContext);
Opm::parameter::ParameterGroup params;
params.insertParameter("deck_filename", "foo.data");
eclipseState.reset(new Opm::EclipseState(deck , parseContext));
auto eclGrid = eclipseState->getEclipseGrid();
BOOST_CHECK(eclGrid->getNX() == 3);
BOOST_CHECK(eclGrid->getNY() == 3);
BOOST_CHECK(eclGrid->getNZ() == 3);
BOOST_CHECK(eclGrid->getCartesianSize() == 3*3*3);
simTimer.reset(new Opm::SimulatorTimer());
simTimer->init(eclipseState->getSchedule()->getTimeMap());
// also create an UnstructuredGrid (required to create a BlackoilState)
Opm::EclipseGridConstPtr constEclGrid(eclGrid);
ourFineGridManagerPtr.reset(new Opm::GridManager(constEclGrid));
const UnstructuredGrid &ourFinerUnstructuredGrid = *ourFineGridManagerPtr->c_grid();
BOOST_CHECK(ourFinerUnstructuredGrid.cartdims[0] == 3);
BOOST_CHECK(ourFinerUnstructuredGrid.cartdims[1] == 3);
BOOST_CHECK(ourFinerUnstructuredGrid.cartdims[2] == 3);
BOOST_CHECK(ourFinerUnstructuredGrid.number_of_cells == 3*3*3);
Opm::PhaseUsage phaseUsage = Opm::phaseUsageFromDeck(deck);
eclWriter.reset(new Opm::EclipseWriter(params,
eclipseState,
phaseUsage,
ourFinerUnstructuredGrid.number_of_cells,
0));
// this check is disabled so far, because UnstructuredGrid uses some weird definition
// of the term "face". For this grid, "number_of_faces" is 108 which is
// 2*6*numCells...
//BOOST_CHECK(ourFinerUnstructuredGrid.number_of_faces == 4*4*4);
int numCells = ourFinerUnstructuredGrid.number_of_cells;
for (int cellIdx = 0; cellIdx < numCells; ++cellIdx)
BOOST_CHECK(ourFinerUnstructuredGrid.global_cell[cellIdx] == cellIdx);
}