Beispiel #1
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
bool RIApplication::openEclipseCase(const QString& caseName, const QString& caseFileName)
{
    QFileInfo gridFileName(caseFileName);
    QString casePath = gridFileName.absolutePath();

    RimResultReservoir* rimResultReservoir = new RimResultReservoir();
    rimResultReservoir->caseName = caseName;
    rimResultReservoir->caseFileName = caseFileName;
    rimResultReservoir->caseDirectory = casePath;

    m_project->reservoirs.push_back(rimResultReservoir);

    RimReservoirView* riv = rimResultReservoir->createAndAddReservoirView();

    if (m_preferences->autocomputeSOIL)
    {
        // Select SOIL as default result variable
        riv->cellResult()->resultType = RimDefines::DYNAMIC_NATIVE;
        riv->cellResult()->resultVariable = "SOIL";
        riv->animationMode = true;
    }

    riv->loadDataAndUpdate();

    if (!riv->cellResult()->hasResult())
    {
        riv->cellResult()->resultVariable = RimDefines::undefinedResultName();
    }

    onProjectOpenedOrClosed();

    return true;
}
Beispiel #2
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
bool RIApplication::openInputEclipseCase(const QString& caseName, const QStringList& caseFileNames)
{
    RimInputReservoir* rimInputReservoir = new RimInputReservoir();
    rimInputReservoir->caseName = caseName;
    rimInputReservoir->openDataFileSet(caseFileNames);

    m_project->reservoirs.push_back(rimInputReservoir);

    RimReservoirView* riv = rimInputReservoir->createAndAddReservoirView();

    riv->cellResult()->resultType = RimDefines::INPUT_PROPERTY;
    riv->animationMode = true;

    riv->loadDataAndUpdate();

    if (!riv->cellResult()->hasResult())
    {
        riv->cellResult()->resultVariable = RimDefines::undefinedResultName();
    }

    onProjectOpenedOrClosed();

    return true;
}