2016-12-16 14:38:27 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2016- Statoil ASA
|
|
|
|
|
//
|
|
|
|
|
// 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
|
|
|
|
|
|
2017-06-14 07:25:34 +02:00
|
|
|
#include "RiaEclipseUnitTools.h"
|
2017-02-16 15:22:03 +01:00
|
|
|
|
2016-12-16 14:38:27 +01:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
|
|
2017-02-07 09:09:00 +01:00
|
|
|
class RimFractureTemplate;
|
2016-12-16 14:38:27 +01:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
2017-02-07 11:08:56 +01:00
|
|
|
class RimFractureTemplateCollection : public caf::PdmObject
|
2016-12-16 14:38:27 +01:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
|
|
public:
|
2018-03-20 13:22:48 +01:00
|
|
|
RimFractureTemplateCollection();
|
|
|
|
|
virtual ~RimFractureTemplateCollection();
|
2018-02-21 09:10:40 +01:00
|
|
|
|
2018-03-02 14:33:47 +01:00
|
|
|
RimFractureTemplate* fractureTemplate(int id) const;
|
2018-03-02 09:33:17 +01:00
|
|
|
std::vector<RimFractureTemplate*> fractureTemplates() const;
|
|
|
|
|
void addFractureTemplate(RimFractureTemplate* templ);
|
|
|
|
|
RiaEclipseUnitTools::UnitSystemType defaultUnitSystemType() const;
|
|
|
|
|
|
2018-02-21 09:10:40 +01:00
|
|
|
RimFractureTemplate* firstFractureOfUnit(RiaEclipseUnitTools::UnitSystem unitSet) const;
|
2017-02-16 15:22:03 +01:00
|
|
|
|
2018-02-06 12:57:50 +01:00
|
|
|
std::vector<std::pair<QString, QString> > resultNamesAndUnits() const;
|
2018-01-25 12:14:54 +01:00
|
|
|
void computeMinMax(const QString& uiResultName, const QString& unit, double* minValue, double* maxValue, double* posClosestToZero, double* negClosestToZero) const;
|
2017-02-16 15:22:03 +01:00
|
|
|
|
2018-02-27 12:05:37 +01:00
|
|
|
void createAndAssignTemplateCopyForNonMatchingUnit();
|
2017-03-06 11:36:07 +01:00
|
|
|
void loadAndUpdateData();
|
2017-01-02 10:12:43 +01:00
|
|
|
|
2017-08-03 13:21:19 +02:00
|
|
|
void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
|
2018-02-02 09:06:24 +01:00
|
|
|
protected:
|
2018-03-02 09:33:17 +01:00
|
|
|
virtual void initAfterRead() override;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
int nextFractureTemplateId();
|
|
|
|
|
|
|
|
|
|
caf::PdmChildArrayField<RimFractureTemplate*> m_fractureDefinitions;
|
|
|
|
|
caf::PdmField< RiaEclipseUnitTools::UnitSystemType > m_defaultUnitsForFracTemplates;
|
|
|
|
|
caf::PdmField<int> m_nextValidFractureTemplateId; // Unique fracture template ID within a project, used to identify a fracture template
|
2018-02-02 09:06:24 +01:00
|
|
|
|
2016-12-16 14:38:27 +01:00
|
|
|
};
|