mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1596 Move RiaDefines to Application
This commit is contained in:
@@ -6,11 +6,13 @@ endif()
|
||||
|
||||
set (SOURCE_GROUP_HEADER_FILES
|
||||
${CEE_CURRENT_LIST_DIR}RiaApplication.h
|
||||
${CEE_CURRENT_LIST_DIR}RiaDefines.h
|
||||
${CEE_CURRENT_LIST_DIR}RiaPreferences.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
${CEE_CURRENT_LIST_DIR}RiaApplication.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RiaDefines.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RiaMain.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RiaPreferences.cpp
|
||||
)
|
||||
|
||||
111
ApplicationCode/Application/RiaDefines.cpp
Normal file
111
ApplicationCode/Application/RiaDefines.cpp
Normal file
@@ -0,0 +1,111 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2011- Statoil ASA
|
||||
// Copyright (C) 2013- Ceetron Solutions AS
|
||||
// Copyright (C) 2011-2012 Ceetron AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "cafAppEnum.h"
|
||||
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void caf::AppEnum< RiaDefines::ResultCatType >::setUp()
|
||||
{
|
||||
addItem(RiaDefines::DYNAMIC_NATIVE, "DYNAMIC_NATIVE", "Dynamic");
|
||||
addItem(RiaDefines::STATIC_NATIVE, "STATIC_NATIVE", "Static");
|
||||
addItem(RiaDefines::GENERATED, "GENERATED", "Generated");
|
||||
addItem(RiaDefines::INPUT_PROPERTY, "INPUT_PROPERTY", "Input Property");
|
||||
addItem(RiaDefines::FORMATION_NAMES, "FORMATION_NAMES", "Formation Names");
|
||||
addItem(RiaDefines::FLOW_DIAGNOSTICS, "FLOW_DIAGNOSTICS", "Flow Diagnostics");
|
||||
setDefault(RiaDefines::DYNAMIC_NATIVE);
|
||||
}
|
||||
|
||||
template<>
|
||||
void caf::AppEnum< RiaDefines::PorosityModelType >::setUp()
|
||||
{
|
||||
addItem(RiaDefines::MATRIX_MODEL, "MATRIX_MODEL", "Matrix");
|
||||
addItem(RiaDefines::FRACTURE_MODEL, "FRACTURE_MODEL", "Fracture");
|
||||
|
||||
setDefault(RiaDefines::MATRIX_MODEL);
|
||||
}
|
||||
|
||||
template<>
|
||||
void caf::AppEnum< RiaDefines::DepthUnitType >::setUp()
|
||||
{
|
||||
addItem(RiaDefines::UNIT_METER, "UNIT_METER", "Meter");
|
||||
addItem(RiaDefines::UNIT_FEET, "UNIT_FEET", "Feet");
|
||||
addItem(RiaDefines::UNIT_NONE, "UNIT_NONE", "None");
|
||||
|
||||
|
||||
setDefault(RiaDefines::UNIT_METER);
|
||||
}
|
||||
|
||||
template<>
|
||||
void caf::AppEnum< RiaDefines::PlotAxis >::setUp()
|
||||
{
|
||||
addItem(RiaDefines::PLOT_AXIS_LEFT, "PLOT_AXIS_LEFT", "Left");
|
||||
addItem(RiaDefines::PLOT_AXIS_RIGHT, "PLOT_AXIS_RIGHT", "Right");
|
||||
|
||||
setDefault(RiaDefines::PLOT_AXIS_LEFT);
|
||||
}
|
||||
|
||||
template<>
|
||||
void caf::AppEnum< RiaDefines::CompletionType >::setUp()
|
||||
{
|
||||
addItem(RiaDefines::WELL_PATH, "WELL_PATH", "Well Path");
|
||||
addItem(RiaDefines::PERFORATION_INTERVAL, "PERFORATION_INTERVAL", "Perforation Interval");
|
||||
addItem(RiaDefines::FISHBONES, "FISHBONES", "Fishbones");
|
||||
|
||||
setDefault(RiaDefines::WELL_PATH);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaDefines::isPerCellFaceResult(const QString& resultName)
|
||||
{
|
||||
if (resultName.compare(RiaDefines::combinedTransmissibilityResultName(), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (resultName.compare(RiaDefines::combinedMultResultName(), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (resultName.compare(RiaDefines::ternarySaturationResultName(), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (resultName.compare(RiaDefines::combinedRiTranResultName(), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (resultName.compare(RiaDefines::combinedRiMultResultName(), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (resultName.compare(RiaDefines::combinedRiAreaNormTranResultName(), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
106
ApplicationCode/Application/RiaDefines.h
Normal file
106
ApplicationCode/Application/RiaDefines.h
Normal file
@@ -0,0 +1,106 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2011- Statoil ASA
|
||||
// Copyright (C) 2013- Ceetron Solutions AS
|
||||
// Copyright (C) 2011-2012 Ceetron AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
|
||||
class RiaDefines
|
||||
{
|
||||
|
||||
public:
|
||||
enum ResultCatType
|
||||
{
|
||||
DYNAMIC_NATIVE,
|
||||
STATIC_NATIVE,
|
||||
GENERATED,
|
||||
INPUT_PROPERTY,
|
||||
FORMATION_NAMES,
|
||||
FLOW_DIAGNOSTICS,
|
||||
REMOVED
|
||||
};
|
||||
|
||||
enum PorosityModelType
|
||||
{
|
||||
MATRIX_MODEL,
|
||||
FRACTURE_MODEL
|
||||
};
|
||||
|
||||
enum CompletionType {
|
||||
WELL_PATH,
|
||||
PERFORATION_INTERVAL,
|
||||
FISHBONES
|
||||
};
|
||||
|
||||
static bool isPerCellFaceResult(const QString& resultName);
|
||||
|
||||
static QString undefinedResultName() { return "None"; }
|
||||
static QString undefinedGridFaultName() { return "Undefined Grid Faults"; }
|
||||
static QString undefinedGridFaultWithInactiveName() { return "Undefined Grid Faults With Inactive"; }
|
||||
static QString combinedTransmissibilityResultName() { return "TRANXYZ"; }
|
||||
static QString ternarySaturationResultName() { return "TERNARY"; }
|
||||
static QString combinedMultResultName() { return "MULTXYZ"; }
|
||||
|
||||
static QString riTranXResultName() { return "riTRANX"; }
|
||||
static QString riTranYResultName() { return "riTRANY"; }
|
||||
static QString riTranZResultName() { return "riTRANZ"; }
|
||||
static QString combinedRiTranResultName() { return "riTRANXYZ"; }
|
||||
|
||||
static QString riMultXResultName() { return "riMULTX"; }
|
||||
static QString riMultYResultName() { return "riMULTY"; }
|
||||
static QString riMultZResultName() { return "riMULTZ"; }
|
||||
static QString combinedRiMultResultName() { return "riMULTXYZ"; }
|
||||
|
||||
static QString riAreaNormTranXResultName() { return "riTRANXbyArea"; }
|
||||
static QString riAreaNormTranYResultName() { return "riTRANYbyArea"; }
|
||||
static QString riAreaNormTranZResultName() { return "riTRANZbyArea"; }
|
||||
static QString combinedRiAreaNormTranResultName() { return "riTRANXYZbyArea"; }
|
||||
|
||||
static QString completionTypeResultName() { return "Completion Type"; }
|
||||
|
||||
// Mock model text identifiers
|
||||
static QString mockModelBasic() { return "Result Mock Debug Model Simple"; }
|
||||
static QString mockModelBasicWithResults() { return "Result Mock Debug Model With Results"; }
|
||||
static QString mockModelLargeWithResults() { return "Result Mock Debug Model Large With Results"; }
|
||||
static QString mockModelCustomized() { return "Result Mock Debug Model Customized"; }
|
||||
static QString mockModelBasicInputCase() { return "Input Mock Debug Model Simple"; }
|
||||
|
||||
|
||||
//Units and conversions
|
||||
enum DepthUnitType
|
||||
{
|
||||
UNIT_METER,
|
||||
UNIT_FEET,
|
||||
UNIT_NONE
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Defines relate to plotting
|
||||
enum PlotAxis
|
||||
{
|
||||
PLOT_AXIS_LEFT,
|
||||
PLOT_AXIS_RIGHT
|
||||
};
|
||||
|
||||
static double minimumDefaultValuePlot() { return - 10.0; }
|
||||
static double maximumDefaultValuePlot() { return 100.0; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user